-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
31 lines (26 loc) · 1.11 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
# nginx folder with nginx.conf file should be in the root folder near node_modules because of docker.standalone
server {
# any port above 1024 will work (except 8080 which is already used by nginx default setup)
listen 3000;
if($request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security-Policy "default-src 'self' https:; script-src 'self' https: 'unsafe-inline' 'unsafe-eval';connect-src https: http: localhost:* ws://localhost:* 'self'; style-src 'self' 'unsafe-inline' https:; object-src 'none'; font-src https: 'self' data:" always;
location / {
root /usr/share/nginx/app;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# gzip
gzip on;
gzip_vary on;
gzip_proxied on;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
}