39 lines
1.3 KiB
Text
39 lines
1.3 KiB
Text
|
server {
|
||
|
|
||
|
root /usr/share/nginx/html;
|
||
|
listen 80;
|
||
|
|
||
|
access_log off;
|
||
|
|
||
|
charset UTF-8;
|
||
|
|
||
|
set_real_ip_from 172.16.0.0/12;
|
||
|
set_real_ip_from 10.0.0.0/8;
|
||
|
|
||
|
add_header X-Frame-Options "DENY";
|
||
|
add_header Referrer-Policy "no-referrer";
|
||
|
add_header Access-Control-Allow-Origin "*";
|
||
|
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; img-src data: 'self'; style-src 'self' 'unsafe-inline'; font-src data: 'self'; object-src data:; base-uri 'none'; form-action 'none'; worker-src 'self'; connect-src 'self'; manifest-src 'self'";
|
||
|
add_header Feature-Policy "geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; vibrate 'none'; fullscreen 'self'; payment 'none'; usb 'none';";
|
||
|
add_header Allow "GET, HEAD" always;
|
||
|
|
||
|
if ( $request_method !~ ^(GET|HEAD)$ ) {
|
||
|
return 405;
|
||
|
}
|
||
|
|
||
|
location / {
|
||
|
root /usr/share/nginx/html;
|
||
|
index index.json;
|
||
|
try_files $uri $uri/index.json $uri.html =404;
|
||
|
}
|
||
|
|
||
|
error_page 404 /404.html;
|
||
|
|
||
|
# 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;
|
||
|
}
|
||
|
}
|