-
Notifications
You must be signed in to change notification settings - Fork 26
/
default.conf
44 lines (36 loc) · 1.24 KB
/
default.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
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html/;
# disable content-type sniffing on some browsers.
add_header X-Content-Type-Options nosniff;
# This header enables the Cross-site scripting (XSS) filter
add_header X-XSS-Protection "1; mode=block";
# This will enforce HTTP browsing into HTTPS and avoid ssl stripping attack
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
# Add GZIP compression for speed optimization
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";
error_page 404 /index.html;
location ~ /\.ht {
deny all;
}
location /healthz {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 '{"status":"UP"}';
}
location / {
alias /usr/share/nginx/html/;
try_files $uri $uri/ @index;
}
location @index {
add_header Cache-Control "no-store, no-cache, must-revalidate";
expires -1;
try_files $uri /index.html =404;
}
}