-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
22 lines (20 loc) · 825 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
# Enables response header of "Vary: Accept-Encoding"
gzip_vary on;
location / {
try_files $uri $uri/ /index.html;
# X-Frame-Options is to prevent from clickJacking attack
add_header X-Frame-Options SAMEORIGIN;
# 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_header Referrer-Policy "no-referrer-when-downgrade";
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
}