forked from swapagarwal/swag-for-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
39 lines (32 loc) · 933 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
server {
listen 80;
root /usr/share/nginx/html/devswag;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types *;
location / {
index index.html;
add_header X-Frame-Options "SAMEORIGIN";
add_header Referrer-Policy "strict-origin-when-cross-origin";
add_header X-XSS-Protection "1; mode=block";
add_header Feature-Policy "accelerometer 'none'; camera 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; payment 'none'; usb 'none'";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header X-Content-Type-Options "nosniff";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
error_page 404 = @error;
location @error {
return 302 /;
}
location = /hacktoberfest {
return 302 /?tags=hacktoberfest;
}
location ~ ^/assets/(js|css|img|swag-img) {
expires 2y;
}
}