-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_headers
More file actions
28 lines (26 loc) · 1.41 KB
/
_headers
File metadata and controls
28 lines (26 loc) · 1.41 KB
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
# Cloudflare Pages — cache policy
#
# Vendored WASM lives at a stable URL (`ruvector_wasm_bg.wasm`) but its
# bytes change across rebuilds (e.g. 2026-04 hnsw-wasm backend swap).
# So `immutable` is a lie — it would pin returning visitors to an old
# binary for up to a year after a vendor rebuild. One-hour TTL instead:
# CF origin always has the latest bytes; returning browsers revalidate
# cheaply (104 KB gzipped) within an hour of any rebuild deploy.
#
# App code under AI-Car-Racer/ changes more often; keep a short TTL so
# iterations land quickly. Pages' default `ETag` + revalidation still
# protects against stale bundles on top of this.
/vendor/ruvector/*
# `no-transform` is load-bearing: CF Pages (with Auto Minify / Rocket
# Loader / similar) was rewriting `ruvector_wasm.js` in-transit — the
# reorder broke wasm-bindgen's import table (LinkError on
# `__wbg_..._clone_ref` because the expected shim wasn't at the
# expected key after reorder). `no-transform` is the HTTP-spec way
# to tell caches/proxies not to mangle the body.
Cache-Control: public, max-age=3600, no-transform
/AI-Car-Racer/*
# `no-transform` for the same reason the vendor tree has it:
# CF Pages was rewriting `ruvectorBridge.js` in-transit
# (static-import query strings were being stripped), which defeated
# the cache-bust used to route around the vendor stale-cache issue.
Cache-Control: public, max-age=300, no-transform