Skip to content

fix: updated redirect data urls #1928

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 17 commits into from
Mar 14, 2023
Merged

fix: updated redirect data urls #1928

merged 17 commits into from
Mar 14, 2023

Conversation

taty2010
Copy link
Contributor

@taty2010 taty2010 commented Feb 16, 2023

Summary

This update will normalize data redirects

closes #1800

Test plan

  1. Visit the Deploy Preview (insert link to specific page) ...

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

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.

@taty2010 taty2010 requested a review from a team February 16, 2023 20:30
@taty2010 taty2010 self-assigned this Feb 16, 2023
@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6410bf3054dcf100089b06ef
😎 Deploy Preview https://deploy-preview-1928--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6410bf30d94a5300070ab739
😎 Deploy Preview https://deploy-preview-1928--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/6410bf30e723880007d2a33d
😎 Deploy Preview https://deploy-preview-1928--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Feb 16, 2023
@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/6410bf302ecc2e0008c16860
😎 Deploy Preview https://deploy-preview-1928--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6410bf3070b4e300087a50f4
😎 Deploy Preview https://deploy-preview-1928--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/6410bf3070b4e300087a50ef
😎 Deploy Preview https://deploy-preview-1928--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/6410bf3068846f0007525452
😎 Deploy Preview https://deploy-preview-1928--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/6410bf302ecc2e0008c16865
😎 Deploy Preview https://deploy-preview-1928--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 16, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit c16f6ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/6410bf3064d2800008278685
😎 Deploy Preview https://deploy-preview-1928--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@taty2010 taty2010 marked this pull request as draft February 16, 2023 21:55
@taty2010 taty2010 marked this pull request as ready for review February 17, 2023 19:31
@taty2010
Copy link
Contributor Author

The middleware-redirect test is failing within the PR but not locally.

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.

I see it's all good now. Ubuntu tests are still hanging, but given the other OSes for tests are passing, going to go ahead and approve. If the Ubuntu tests are still hanging, try restarting the job.

:shipit:

@@ -250,6 +266,12 @@ export const buildResponse = async ({
res.headers.set('x-nextjs-redirect', relativizeURL(redirect, request.url))
}

const nextRedirect = res.headers.get('x-nextjs-redirect')

Choose a reason for hiding this comment

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

We tested this together and it works well. I still have no idea why we have to set the header first, get it and the reset it. If anyone knows why, I'm curious. 🕵🏻

@nickytonline
Copy link

Just checking in here @taty2010. Anything else need to be done here or are the test failures valid failures?

@taty2010
Copy link
Contributor Author

Just checking in here @taty2010. Anything else need to be done here or are the test failures valid failures?

@nickytonline Looks like everything is finally good to go now, the one failing test is the same as before and doesn't seem related to this PR.

@kodiakhq kodiakhq bot merged commit 1edaacb into main Mar 14, 2023
@kodiakhq kodiakhq bot deleted the tn/data-redirect branch March 14, 2023 18:42
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.

Middleware data redirects should normalize destination
3 participants