# Included inside the cp.dunerealms.com TLS server block. # Existing V1 owner authorization remains authoritative via the loopback backend. location = /_cp_v2_owner_check { internal; proxy_pass http://127.0.0.1:3003/v2/v2.css; proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_set_header Cookie $http_cookie; proxy_set_header Host cp.dunerealms.com; proxy_set_header X-Forwarded-Proto https; proxy_connect_timeout 3s; proxy_read_timeout 10s; } location = /v2 { return 308 /v2/; } location ^~ /v2/ { if ($request_method !~ ^(GET|HEAD)$) { return 405; } if ($uri !~ "^/v2/(|[a-z0-9][a-z0-9-]*\.(html|css|js|mjs|json))$") { return 404; } if ($uri ~* git) { return 404; } auth_request /_cp_v2_owner_check; alias /var/lib/dunerealms-cp-v2/current/; index index.html; autoindex off; types { text/html html; text/css css; text/javascript js mjs; application/json json; } default_type application/octet-stream; add_header Cache-Control "private, no-store" always; add_header X-Robots-Tag "noindex, nofollow, noarchive" always; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy no-referrer always; add_header Strict-Transport-Security "max-age=15552000" always; add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://www.dunerealms.com; style-src 'self' https://www.dunerealms.com https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://www.dunerealms.com; img-src 'self' data: https://www.dunerealms.com https://support.dunerealms.com; frame-src 'self' https://luckperms.net https://www.dunerealms.com https://support.dunerealms.com https://forums.dunerealms.com https://clans.dunerealms.com https://wiki.dunerealms.com; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'self' https://www.dunerealms.com https://dunerealms.com https://clans.dunerealms.com" always; }