server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; # Security headers (Stage 2B ยง24.3) add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "DENY" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; # gzip for text payloads (GLB/STL are already compressed/binary) gzip on; gzip_vary on; gzip_min_length 1024; gzip_comp_level 6; gzip_types text/plain text/css application/json application/javascript image/svg+xml; # Explicit 3D model MIME types types { model/gltf-binary glb; model/stl stl; } location = /version.json { add_header Cache-Control "no-store, no-cache, must-revalidate"; add_header X-Content-Type-Options "nosniff" always; try_files $uri =404; } location / { try_files $uri $uri/ /index.html; } location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; } location /models/ { expires 1y; add_header Cache-Control "public, immutable"; } location /draco/ { expires 1y; add_header Cache-Control "public, immutable"; } }