Skip to content

fix: fix Invalid URL error when using uppercase i18n url #1812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Nov 29, 2022
Merged

Conversation

sarahetter
Copy link

@sarahetter sarahetter commented Nov 24, 2022

Summary

When adding a locale such as de-DE to next.config.ts, we were giving an Invalid URL error as it our cdn lowercases paths. By adding a rewrite when these locale redirects are happening, we are able to point at the correct site.

Test plan

  1. Visit the middleware Deploy Preview /de-DE/static route
  2. Observe that the page shows up without an Invalid URL error

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Fixes https://github.com/netlify/pod-ecosystem-frameworks/issues/300
Screen Shot 2022-11-24 at 2 59 27 PM

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@sarahetter sarahetter requested a review from a team November 24, 2022 20:01
@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/6385f5a4170bfb000859b95d

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for netlify-plugin-nextjs-export-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/6385f5a4e90a580008c199c9

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for netlify-plugin-nextjs-static-root-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6385f5a4d6bf5c000aec8120

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for next-plugin-edge-middleware canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6385f5a4056a570009e508dc

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for next-plugin-canary canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/6385f5a4d83eb500087a1e39

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for next-i18next-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/6385f5a4263ae30009758143

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for netlify-plugin-nextjs-next-auth-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/6385f5a42955640008c91287

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for netlify-plugin-nextjs-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6385f5a4b69b600008d8ddac

@netlify
Copy link

netlify bot commented Nov 24, 2022

Deploy Preview for nextjs-plugin-custom-routes-demo canceled.

Name Link
🔨 Latest commit 0cb3a78
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/6385f5a4e90a580008c199ce

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 24, 2022
Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left a dusty comment.

@sarahetter
Copy link
Author

@ascorbic / @nickytonline Just looked with Nick - PR looks fine, just a few of the deploy previews are failing because it's unable to find the new @netlify/edge-functions (and some are able to find it properly 😕 )

I'm away for December, can one of you take care of this while I'm gone?

@ascorbic
Copy link
Contributor

I think I know what's up. I'll take a look

@kodiakhq kodiakhq bot merged commit 63e060d into main Nov 29, 2022
@kodiakhq kodiakhq bot deleted the i18-fix branch November 29, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants