-
Notifications
You must be signed in to change notification settings - Fork 89
test: adjust assertions to work with validateRSCRequestHeaders enabled #2985
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
test: adjust assertions to work with validateRSCRequestHeaders enabled #2985
Conversation
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
if (response.url().includes('/test/rewrite-to-cached-page')) { | ||
if ( | ||
(response.url().includes('/test/rewrite-to-cached-page') || | ||
response.url().includes('/caching-rewrite-target')) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note - the redirect that happens due to validateRSCRequestHeaders
( https://github.com/vercel/next.js/blob/21ff892d05e43644ebfd990d03d7f1742f9c46a7/packages/next/src/server/base-server.ts#L2086-L2098 ) result in seeing redirect with location being rewrite target
Description
next@canary
now are automatically opting intovalidateRSCRequestHeaders
(note currently it seems like this is enabled in canary only - vercel/next.js#80954 so possibly won't be applied to future stable releases and will remain canary-only)This does result in additional 307 redirects for middleware redirects ... and rewrites (!).
In this PR I adjusted our currently failing tests for cache poisoning to work with that additional redirect