Skip to content

Commit e531d8f

Browse files
committed
fix: return 404 on missing assets (@fehmer)
1 parent 9896c18 commit e531d8f

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

frontend/firebase.json

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,7 @@
44
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
55
"rewrites": [
66
{
7-
"source": "/privacy-policy",
8-
"destination": "/privacy-policy.html"
9-
},
10-
{
11-
"source": "/terms-of-service",
12-
"destination": "/terms-of-service.html"
13-
},
14-
{
15-
"source": "/security-policy",
16-
"destination": "/security-policy.html"
17-
},
18-
{
19-
"source": "/adtest",
20-
"destination": "/adtest.html"
21-
},
22-
{
23-
"source": "/test",
24-
"destination": "/index.html"
25-
},
26-
{
27-
"source": "!/@(js|about|challenges|css|fonts|funbox|images|languages|layouts|quotes|sound|themes|webfonts)/**",
7+
"source": "/@(test|settings|about|account|login|profile|friends|account-settings|leaderboards){,/**}",
288
"destination": "/index.html"
299
}
3010
],

frontend/src/ts/controllers/page-controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type ChangeOptions = {
2626
loadingOptions?: LoadingOptions;
2727
};
2828

29+
// NOTE: whenever adding a page add the pathname to the `firebase.json` rewrite rule
2930
const pages = {
3031
loading: PageLoading.page,
3132
test: PageTest.page,

0 commit comments

Comments
 (0)