Merged in fix/allow-double-locales (pull request #2977)

Fix/allow double locales

* allow double locales for now

* update redirects


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-10-16 07:59:42 +00:00
parent a6e10a0628
commit b5817c5dcd
8 changed files with 12 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -85,7 +85,11 @@ describe("createRedirectEntry", () => {
})
})
it("throws when non-dotcom has locale in path", () => {
/*
* This is currently a warning instead. Content will in the future clean this up.
* And then we can re-enable this test to throw.
*/
it.skip("throws when non-dotcom has locale in path", () => {
expect(() =>
createRedirectEntry({
oldUrl: "https://scandichotels.se/sv/old-path",

View File

@@ -40,10 +40,7 @@ function validateUrl(url: string) {
}
if (hasOldHostnameAndLocale(output)) {
throw new Error(
"Unsupported URL found, non-.com hostname with locale in path",
{ cause: output.href }
)
console.warn(output.href, "- potentially unsupported format found")
}
return output