Repository navigation
Expand file tree
/
Copy pathnginx.conf
More file actions
84 lines (67 loc) · 1.99 KB
/
Copy pathnginx.conf
File metadata and controls
84 lines (67 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
worker_processes 2;
events
{
worker_connections 128;
}
http
{
# Uncomment this lines to force redirect to HTTPS
#server
#{
# listen 80;
# return 301 https://$host$request_uri;
#}
server
{
server_tokens off;
# Uncomment this lines to enable SSL
# listen 443 ssl http2;
# ssl on;
server_name tudominio.com;
root /usr/share/nginx/html/dist;
index index.html;
include mime.types;
default_type application/octet-stream;
sendfile on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Uncomment this lines to set the certificates for SSL
# ssl_certificate /etc/nginx/ssl/server.crt;
# ssl_certificate_key /etc/nginx/ssl/server.key;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-eval'; connect-src 'self' https://node.skycoin.net https://api.coinpaprika.com; img-src 'self' 'unsafe-inline' data:; style-src 'self' 'unsafe-inline'; object-src 'none'; form-action 'none'; frame-ancestors 'none'; block-all-mixed-content; base-uri 'self'";
location ~ \.css
{
add_header Content-Type text/css;
}
location ~ \.js
{
add_header Content-Type application/javascript;
}
location /
{
expires -1;
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
try_files $uri $uri/ /index.html;
}
location ~* \.(?:manifest|appcache|html?|xml|json)$
{
expires -1;
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$
{
expires 1M;
access_log off;
add_header Cache-Control "public";
}
location ~* \.(?:css|js)$
{
expires 1d;
access_log off;
add_header Cache-Control "public";
}
}
}