-
Notifications
You must be signed in to change notification settings - Fork 38
/
default.conf
38 lines (32 loc) · 1.11 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
server {
listen $HTTP_PORT;
listen $HTTPS_PORT;
server_name $SERVER_NAME;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Content-Security-Policy "frame-ancestors 'self';" always;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
add_header X-Permitted-Cross-Domain-Policies none;
index index.html index.htm;
charset utf-8;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location / {
try_files $uri $uri/ =404;
error_page 404 /;
root /usr/share/nginx/html;
sub_filter '<base href="/"' '<base href="$CONSOLE_BASE_HREF"';
sub_filter_once on;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}