fix(web): give static assets a validator caches can check
The front-end was served with `no-cache` but no `ETag` and no `Last-Modified`, so a cache had nothing to revalidate against and could keep handing out modules older than the API they talk to — which surfaces as a cryptic error in a view rather than as anything resembling a stale cache. Assets now carry both, and an unchanged file answers 304. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
3 files changed
+35
-2
No files matched your search
+1
-1
@@ -75,7 +75,7 @@ export function createHandler({ client = null, setupOnly = false, startedAt = Da
|
||||
// The wiki is a separate public page: it must never fall back to the
|
||||
// dashboard shell, which would send a visitor to a login screen.
|
||||
const fallback = pathname === '/wiki' || pathname.startsWith('/wiki/') ? 'wiki.html' : 'index.html';
|
||||
const served = await sendStatic(response, publicDir, pathname, { fallback });
|
||||
const served = await sendStatic(response, publicDir, pathname, { fallback, request });
|
||||
if (!served) sendEmpty(response, 404);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user