Commit a938746
authored
feat(next): Redirect next app to default locale for invalid locales
Because:
* The next app uses routing to handle locale indication, but has no rerouting fallback functionality for improper locales.
This commit:
* Adds functionality to the Next.js middleware to catch incoming requests to next app on routes other than: api|_next/static|_next/image|favicon.ico|__heartbeat__|__lbheartbeat__|__version__
Closes FXA-10440
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
77 | | - | |
| 87 | + | |
| 88 | + | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
| |||
0 commit comments