/** * Static-asset route for the dashboard SPA. * * GET /_dashboard → index.html (SPA shell) * GET /_dashboard/ → index.html * GET /_dashboard/ → file from packages/dashboard/dist or * SPA fallback to index.html when the * path is a virtual (client-side) route * * Registered BEFORE the auth gate in `server.ts` so the login UI can * load for unauthenticated users — anything the dashboard fetches over * `/api/*` enforces auth on its own. This file never executes user * code or evaluates JSON; it only streams bytes off disk inside a * path-prefix sandbox. * * Path-traversal defense: we normalize the URL-decoded tail with * `path.normalize` and verify that the resolved absolute path still * lives under the dashboard `dist/` directory. Anything that tries to * escape via `..` or absolute-looking segments gets rejected with 400. * * Caching: * /_dashboard/assets/* → public, max-age=31536000, immutable * (filenames are content-hashed by Vite) * index.html → no-cache, must-revalidate * (the entry point pulls in the latest * hashed assets after a deploy) */ import type { IncomingMessage, ServerResponse } from "node:http"; import type { RouteContext } from "../route-context.js"; export declare function handle(req: IncomingMessage, res: ServerResponse, ctx: RouteContext): Promise; //# sourceMappingURL=dashboard-assets.d.ts.map