# Cache rules for Cloudflare (copied into dist/ by the build). # # The page itself must always be fresh, so a push shows up right away. # Everything in /assets/ has a content hash in its file name: a new build # gets new names, so browsers may keep those files forever (fast repeat visits, # and the 23 MB geometry engine is downloaded once). / Cache-Control: no-cache /index.html Cache-Control: no-cache /manifest.webmanifest Cache-Control: no-cache /assets/* Cache-Control: public, max-age=31536000, immutable /sw.js Cache-Control: no-cache /offline-files.json Cache-Control: no-cache /version.json Cache-Control: no-cache # Security, on every file. # - What the page may load and run: its own files only. No script written into the page runs (a project file from # someone else that got markup onto the page could do nothing with it), no script from another site, no plugins. # 'unsafe-eval' is for the geometry engine, which builds part of itself as it starts ('wasm-unsafe-eval': its # WebAssembly). Pictures and the Browser window's pages may come from anywhere: they are what the user opens. # - Files are what they say they are (nosniff); other sites are told only the site's address, not the page's. /* Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https: http:; font-src 'self' data:; connect-src 'self' data: blob:; worker-src 'self' blob:; frame-src https: http:; media-src 'self' data: blob:; object-src 'none'; base-uri 'self'; form-action 'none' X-Content-Type-Options: nosniff Referrer-Policy: strict-origin-when-cross-origin