-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
39 lines (39 loc) · 1.68 KB
/
Copy pathwrangler.jsonc
File metadata and controls
39 lines (39 loc) · 1.68 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
29
30
31
32
33
34
35
36
37
38
39
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "only-dashboard",
"main": "src/worker/index.ts",
"compatibility_date": "2026-08-27",
"compatibility_flags": ["nodejs_compat"],
"assets": {
// Built by @cloudflare/vite-plugin.
"directory": "./dist/client",
// Lets the Worker serve assets itself — see the catch-all in
// src/worker/index.ts, which handles paths routed to the Worker by
// run_worker_first below but not matched by any of its routes.
"binding": "ASSETS",
"not_found_handling": "single-page-application",
// The asset router runs BEFORE the Worker, and "single-page-application"
// makes it answer any browser *navigation* that doesn't match a built file
// with index.html — without invoking the Worker at all. That silently
// swallowed the whole OAuth flow: a top-level navigation carries
// Sec-Fetch-Mode: navigate, so /auth/<p>/start and the provider's redirect
// back to /auth/<p>/callback were served the SPA instead of reaching Hono.
// Listing them here routes those prefixes to the Worker first. Everything
// else keeps asset-first behaviour, which client-side routes rely on.
"run_worker_first": ["/auth/*", "/api/*"]
},
"kv_namespaces": [
{
// Sessions and in-flight OAuth transactions. Create with:
// npx wrangler kv namespace create SESSIONS
// npx wrangler kv namespace create SESSIONS --preview
// then paste the returned ids here and run `npm run cf-typegen`.
"binding": "SESSIONS",
"id": "d8cb0bc5a3774b06a378e2d3c4cd8a85",
"preview_id": "986e3ef1fdd14523898e165acee09a5d"
}
],
"observability": {
"enabled": true
}
}