From 2b39fec1bdf8098041c37a72eee672ef259f8385 Mon Sep 17 00:00:00 2001 From: Christian Fehmer Date: Fri, 16 Jan 2026 16:50:28 +0100 Subject: [PATCH 1/2] fix: return 404 on missing assets (@fehmer) --- frontend/firebase.json | 20 ++----------------- .../src/ts/controllers/page-controller.ts | 1 + 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/frontend/firebase.json b/frontend/firebase.json index 5389730bc9e9..76493f40464d 100644 --- a/frontend/firebase.json +++ b/frontend/firebase.json @@ -4,27 +4,11 @@ "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { - "source": "/privacy-policy", - "destination": "/privacy-policy.html" - }, - { - "source": "/terms-of-service", - "destination": "/terms-of-service.html" - }, - { - "source": "/security-policy", - "destination": "/security-policy.html" - }, - { - "source": "/adtest", - "destination": "/adtest.html" - }, - { - "source": "/test", + "source": "/about", "destination": "/index.html" }, { - "source": "!/@(js|about|challenges|css|fonts|funbox|images|languages|layouts|quotes|sound|themes|webfonts)/**", + "source": "/@(test|settings|account|login|profile|friends|account-settings|leaderboards){,/**}", "destination": "/index.html" } ], diff --git a/frontend/src/ts/controllers/page-controller.ts b/frontend/src/ts/controllers/page-controller.ts index 112179c62dd3..7ad64695b2b2 100644 --- a/frontend/src/ts/controllers/page-controller.ts +++ b/frontend/src/ts/controllers/page-controller.ts @@ -26,6 +26,7 @@ type ChangeOptions = { loadingOptions?: LoadingOptions; }; +// NOTE: whenever adding a page add the pathname to the `firebase.json` rewrite rule const pages = { loading: PageLoading.page, test: PageTest.page, From 5390d23c5493b09808a287ce4575ad9043d8706c Mon Sep 17 00:00:00 2001 From: Christian Fehmer Date: Fri, 16 Jan 2026 17:08:24 +0100 Subject: [PATCH 2/2] remove special handling for about --- frontend/firebase.json | 6 +----- frontend/src/ts/utils/json-data.ts | 4 ++-- frontend/static/{about => }/contributors.json | 0 frontend/static/{about => }/supporters.json | 0 4 files changed, 3 insertions(+), 7 deletions(-) rename frontend/static/{about => }/contributors.json (100%) rename frontend/static/{about => }/supporters.json (100%) diff --git a/frontend/firebase.json b/frontend/firebase.json index 76493f40464d..4b4bc828ed56 100644 --- a/frontend/firebase.json +++ b/frontend/firebase.json @@ -4,11 +4,7 @@ "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { - "source": "/about", - "destination": "/index.html" - }, - { - "source": "/@(test|settings|account|login|profile|friends|account-settings|leaderboards){,/**}", + "source": "/@(test|settings|account|about|login|profile|friends|account-settings|leaderboards){,/**}", "destination": "/index.html" } ], diff --git a/frontend/src/ts/utils/json-data.ts b/frontend/src/ts/utils/json-data.ts index 16eba591a7e7..e8e5ab2b207b 100644 --- a/frontend/src/ts/utils/json-data.ts +++ b/frontend/src/ts/utils/json-data.ts @@ -168,7 +168,7 @@ export async function getChallengeList(): Promise { * @returns A promise that resolves to the list of supporters. */ export async function getSupportersList(): Promise { - const data = await cachedFetchJson("/about/supporters.json"); + const data = await cachedFetchJson("/supporters.json"); return data; } @@ -177,7 +177,7 @@ export async function getSupportersList(): Promise { * @returns A promise that resolves to the list of contributors. */ export async function getContributorsList(): Promise { - const data = await cachedFetchJson("/about/contributors.json"); + const data = await cachedFetchJson("/contributors.json"); return data; } diff --git a/frontend/static/about/contributors.json b/frontend/static/contributors.json similarity index 100% rename from frontend/static/about/contributors.json rename to frontend/static/contributors.json diff --git a/frontend/static/about/supporters.json b/frontend/static/supporters.json similarity index 100% rename from frontend/static/about/supporters.json rename to frontend/static/supporters.json