This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Commit 16abc11
authored
Ensure API routes are not available under the locale (vercel#26629)
This ensures API routes are not available under the locale path since API routes don't need to be localized and we don't provide the locale to the API in any way currently so the user wouldn't be aware if the localized API route was visited instead of the non-localized.
Fixes: vercel#25790
## Bug
- [x] Related issues linked using `fixes #number`
- [x] Integration tests added1 parent dd12f04 commit 16abc11
File tree
2 files changed
+36
-19
lines changed- packages/next/next-server/server
- test/integration/i18n-support/test
2 files changed
+36
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
468 | 475 | | |
469 | 476 | | |
470 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
| 1149 | + | |
1152 | 1150 | | |
1153 | 1151 | | |
1154 | 1152 | | |
1155 | 1153 | | |
1156 | 1154 | | |
1157 | 1155 | | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
| 1156 | + | |
1163 | 1157 | | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1164 | 1169 | | |
1165 | 1170 | | |
1166 | 1171 | | |
1167 | 1172 | | |
1168 | 1173 | | |
1169 | 1174 | | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
| 1175 | + | |
1173 | 1176 | | |
1174 | 1177 | | |
1175 | 1178 | | |
1176 | 1179 | | |
1177 | 1180 | | |
1178 | 1181 | | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
| 1182 | + | |
1186 | 1183 | | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1187 | 1197 | | |
1188 | 1198 | | |
1189 | 1199 | | |
| |||
0 commit comments