gateway: prevent stale web UI assets on localhost

This commit is contained in:
William Valentin
2026-02-18 22:30:47 -08:00
parent 9a0fe3ec56
commit dcbb4649a2
3 changed files with 51 additions and 5 deletions
+2 -1
View File
@@ -295,7 +295,7 @@ describe('GatewayServer integration', () => {
const res = await fetch(`http://127.0.0.1:${TEST_PORT}/`);
expect(res.status).toBe(200);
expect(res.headers.get('content-type')).toBe('text/html');
expect(res.headers.get('cache-control')).toBe('no-cache');
expect(res.headers.get('cache-control')).toBe('no-store');
const body = await res.text();
expect(body).toContain('Flynn');
});
@@ -307,6 +307,7 @@ describe('GatewayServer integration', () => {
const res = await fetch(`http://127.0.0.1:${TEST_PORT}/style.css`);
expect(res.status).toBe(200);
expect(res.headers.get('content-type')).toBe('text/css');
expect(res.headers.get('cache-control')).toBe('no-store');
});
it('serves sw.js with no-store cache policy', async () => {