forked from linus2code/poker-pocket-react-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
71 lines (62 loc) · 1.69 KB
/
nginx.conf
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
server {
listen 80;
http2 on;
root /usr/share/nginx/html;
index index.html;
server_name _;
location / {
try_files $uri /index.html;
}
# Security Headers
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "strict-origin";
# add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline';";
# add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://analytics.nitramite.com; style-src 'self' 'unsafe-inline';";
# Prevent Access to Hidden Files
location ~ /\.(?!well-known).* {
deny all;
}
# Gzip Settings
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types
application/atom+xml
application/geo+json
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rdf+xml
application/rss+xml
application/xhtml+xml
application/xml
application/wasm
font/eot
font/otf
font/ttf
image/svg+xml
text/css
text/javascript
text/plain
text/xml;
# Cache-Control Headers for Static Files
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|otf)$ {
expires 6M;
access_log off;
add_header Cache-Control "public";
}
# Custom 404 Page
# error_page 404 /404.html;
# location = /404.html {
# internal;
# }
}