Spaces:
Running
Running
File size: 1,252 Bytes
1194a18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # Cloudflare Pages / Netlify header rules.
#
# Model weights are large and immutable once fetched; the browser's Cache Storage
# holds them, but these headers keep the static shell cheap to revalidate.
/_next/static/*
Cache-Control: public, max-age=31536000, immutable
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
X-Frame-Options: SAMEORIGIN
# NOTE ON CROSS-ORIGIN ISOLATION
#
# wllama's multi-threaded WASM build needs SharedArrayBuffer, which needs:
# Cross-Origin-Opener-Policy: same-origin
# Cross-Origin-Embedder-Policy: require-corp
#
# Those are deliberately NOT set here. Enabling COEP blocks any cross-origin
# subresource that does not send Cross-Origin-Resource-Policy, and the model
# weights come from huggingface.co and cdn.jsdelivr.net. Turning it on trades a
# working WebGPU path for a faster WASM fallback, which is the wrong trade for
# most visitors. The app detects the absence of SharedArrayBuffer and falls back
# to the single-threaded build automatically.
#
# If you are serving your own weights from the same origin and want the threaded
# build, uncomment these two lines:
#
# /*
# Cross-Origin-Opener-Policy: same-origin
# Cross-Origin-Embedder-Policy: require-corp
|