-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
62 lines (55 loc) · 1.89 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
worker_processes 1;
worker_rlimit_nofile 8192;
error_log /var/log/nginx/error.log;
pid /var/cache/nginx/nginx.pid;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
gzip on;
gzip_min_length 256;
gzip_types
# text/html is always compressed by HttpGzipModule
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/json
application/xml
application/rss+xml
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml;
server {
listen 8080;
root /var/www;
location / {
try_files $uri $uri/ /index.html =404;
# 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 Content-Security-Policy "
default-src 'self' 'unsafe-inline' 'unsafe-eval' *.dso.mil data:;
img-src 'self' *.dso.mil data:;
connect-src 'self' *.dso.mil;
font-src 'self' *.dso.mil data:;
object-src 'self' *.dso.mil;
media-src 'self' *.dso.mil data:;
form-action 'self' *.dso.mil;
manifest-src 'self' *.dso.mil;
frame-src 'none';
frame-ancestors 'none';" always;
}
}
}