also looking at this
Deploy: uniform auth session model (main → production)
#7
282 files
+3028
-64856
| @@ -29,16 +29,22 @@ import type { ServerConfig } from '@stacksjs/types' | ||
| 29 | 29 | * |
| 30 | 30 | * routes/api.ts auto-prefixed /api -> covered by the prefix |
| 31 | 31 | * routes/projects.ts all under /api/ -> covered by the prefix |
| 32 | * routes/auth.ts NOT prefixed -> named individually | |
| 32 | * routes/auth.ts sign-in/up/2FA under /api/auth/ -> covered by the prefix; | |
| 33 | * /logout + the /password/* + /payments/* + /webhooks/* | |
| 34 | * paths are NOT prefixed -> named individually below | |
| 33 | 35 | * routes/logs.ts POST /logs (SDK ingest) -> named |
| 34 | 36 | * routes/buddy.ts POST /jobs/{id}/cancel|retry, parameterised -> prefix |
| 35 | 37 | * |
| 36 | 38 | * `paths` is matched exactly and IGNORES THE METHOD, so a path listed here |
| 37 | 39 | * takes its GET with it. That is why `/login` and `/register` are absent: they |
| 38 | * are the only two paths in the app that have both a POST route and a GET page, | |
| 39 | * and listing them would proxy the sign-in page itself away. They are page | |
| 40 | * actions now — the page handles its own POST — which is what made emptying | |
| 41 | * `methods` possible without breaking them. | |
| 40 | * each still render a GET page (the sign-in / sign-up forms), and listing them | |
| 41 | * would proxy that page away. Their POST no longer lives at those paths — the | |
| 42 | * forms are client-fetch to `/api/auth/login` and `/api/auth/register` (under | |
| 43 | * the proxied `/api/` prefix) — so nothing here needs to name them. The four | |
| 44 | * remaining page-action forms (fix, forgot-password, reset-password, | |
| 45 | * projects/new) DO handle their own POST at their own path, which is what makes | |
| 46 | * emptying `methods` load-bearing: naming any of them here would proxy the page | |
| 47 | * away. | |
| 42 | 48 | * |
| 43 | 49 | * Do not add a path here without checking `resources/views/` for a page of the |
| 44 | 50 | * same name first. The failure is silent: the page stops rendering and the |