20 lines
1.0 KiB
Nginx Configuration File
20 lines
1.0 KiB
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' https://mc.yandex.ru https://yastatic.net; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://mc.yandex.ru; font-src 'self'; connect-src 'self' https://mc.yandex.ru; frame-src 'self' blob: https://mc.yandex.ru; object-src 'none'; base-uri 'self'; frame-ancestors 'self'" 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; }
|
|
}
|