Files
videoreg.ru/deploy/nginx.conf
T

20 lines
915 B
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
charset utf-8;
server_tokens off;
absolute_redirect off;
if ($videoreg_legacy != "") { return 308 $videoreg_legacy; }
add_header X-Content-Type-Options nosniff always;
add_header Referrer-Policy strict-origin-when-cross-origin always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'" always;
location /api/ { return 404; }
location ~ /showcase/?$ { return 404; }
location /_next/static/ { expires 1y; add_header Cache-Control "public, immutable"; }
location /health/ { default_type application/json; try_files $uri =503; }
location / { try_files $uri $uri.html $uri/ =404; }
error_page 404 /404.html;
location = /404.html { internal; }
}