ui: Remove PWA navigate fallback to prevent caching API endpoint requests (#25174)

This commit is contained in:
Aleksander Grygier
2026-07-01 07:32:55 +02:00
committed by GitHub
parent fd1a05791d
commit 7af4279f45
3 changed files with 18 additions and 10 deletions
+4 -2
View File
@@ -108,9 +108,11 @@ describe('PWA Build Output', () => {
expect(swContent).toMatch(/"manifest\.webmanifest"/);
});
it('has navigation route registered', () => {
it('no navigation route — API endpoints bypass PWA', () => {
expect(swContent).toBeTruthy();
expect(swContent).toMatch(/NavigationRoute/);
// NavigationRoute is intentionally absent so direct browser
// navigation to server API endpoints returns JSON, not HTML.
expect(swContent).not.toMatch(/NavigationRoute/);
});
it('has runtime caching for API routes', () => {