mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
178d3b5b0e
* [auth][api] accept the 20250424.01 client * [2025] unstable * 20250718.0 * correct one this time * stubs * more stubs * more stubs * [lists] add worker * [ai] route stubs * [api] player photo setting * [econ] add roomEconConfig route * [infra] update worker generators * [worker] add cards/moderation/platformnotification workers * [lists] updates to some endpoints * [clubs] stub out announcement endpoint, for now * [econ] stub out season endpoints for now * [chat] apps/chat stub out party endpoint not sure the shape yet * [api] stub out statsig and lockeditems * [doc] new services * [lists] stub the bulk endpoint * [datacollection] add placeholder service until we can kill it * [api] set gifting to lvl5 * update lock * [cdn] enable cache * [match] matchmake v2 * [lists] stub some lists * [ai] stubs * [rooms] new subroom save endpoint * [econ] add bulk purchase endpoint * [discovery] update featured creator to 1 for fun * [api] add photo settings flag * [chat] fixup chat permissions (sorta) * [auth] restrictions endpoint * [rooms] contributed endpoint * [api] fix outfit endpoint * [discovery] attempt to fix store * [chat] privacy endpoints * [api] cheered images * [rooms] add xp endpoint (disbaled) * [rooms] add xp endpoint (disabled) * update images-db for cheers * [rooms] add autocomplete endpoint * [cdn/img] increase cache ttl for statics * [api] bulk route for images * [accounts] add banner image * [api] add misc missing endpoints * [discovery] remove AI tab * [platformnotifications] stub some endpoints * [lists] add some more lists * [rooms] additional endpoints * [chat] stub a few privacy endpoints * [econ] stub some endpoints * misc db fixes * [api] tweak shape for images v6 * [rooms] dont show trending RROs
65 lines
2.6 KiB
JSON
65 lines
2.6 KiB
JSON
{
|
|
"$schema": "node_modules/wrangler/config-schema.json",
|
|
"name": "cdn",
|
|
"main": "src/cdn.app.ts",
|
|
"compatibility_date": "2026-06-16",
|
|
"compatibility_flags": ["nodejs_compat"],
|
|
// Workers Caching is OFF here, and must stay off: it STRIPS the `Range` header before
|
|
// invoking the worker, asks for the whole body, and slices the 206 out of its own
|
|
// cache. That works only while the response is actually cacheable — on any bypass
|
|
// (see the automatic bypass rules) nothing slices, and the client that asked for a
|
|
// byte range receives the whole object with a 200. A chunked downloader writes that
|
|
// at the offset it asked for and the reassembled file is corrupt (EAC "Signatures
|
|
// don't match"). With caching off the `Range` header reaches serveAsset, which
|
|
// always answers a `bytes=` request with a 206 and a truthful Content-Range.
|
|
// The cost is that every asset read hits R2; correctness on these blobs is worth it.
|
|
"cache": {
|
|
"enabled": true
|
|
},
|
|
// The JSON config files in `static/config/`, uploaded as Workers static assets rather
|
|
// than bundled into the script, so `/config/:name` serves whatever is published there:
|
|
// adding a config is dropping in a file (a bundled `import` can't do that — the
|
|
// bundler has to see every path at build time).
|
|
//
|
|
// `run_worker_first: true` because these are the WORKER'S data files, not a site.
|
|
// Without it the runtime answers any request whose path matches an asset before the
|
|
// Worker runs, which would both publish every config a second time at
|
|
// `/config/<name>.json` and put asset routing in front of the R2 routes below. With
|
|
// it, the Worker sees every request and the files are reachable only through
|
|
// `/config/:name`.
|
|
"assets": {
|
|
"binding": "ASSETS",
|
|
"directory": "./static",
|
|
"run_worker_first": true
|
|
},
|
|
// CDN binaries (signature blobs + room build data) are stored as R2 objects
|
|
// and streamed back by key. Keys are prefixed `sigs/` and `room/`.
|
|
"r2_buckets": [
|
|
{
|
|
"binding": "CDN_ASSETS",
|
|
"bucket_name": "recflare-cdn"
|
|
}
|
|
],
|
|
// Shared Secrets Store holding the HS256 JWT signing key. Every worker binds the
|
|
// same store as JWT_SECRET so tokens signed by `auth` verify here. The "local"
|
|
// store_id placeholder is replaced with RECFLARE_SECRETS_STORE at deploy time.
|
|
"secrets_store_secrets": [
|
|
{
|
|
"binding": "JWT_SECRET",
|
|
"store_id": "local",
|
|
"secret_name": "JWT_SECRET"
|
|
}
|
|
],
|
|
"upload_source_maps": true,
|
|
"observability": {
|
|
"logs": {
|
|
"enabled": true,
|
|
"head_sampling_rate": 1 // 100%
|
|
}
|
|
},
|
|
"vars": {
|
|
"ENVIRONMENT": "development", // overridden during deployment
|
|
"SENTRY_RELEASE": "unknown" // overridden during deployment
|
|
}
|
|
}
|