Skip to content
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

Ensure RSC is detecting correctly during revalidate #42508

Merged
merged 1 commit into from Nov 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 3 additions & 7 deletions packages/next/server/base-server.ts
Expand Up @@ -484,13 +484,9 @@ export default abstract class Server<ServerOptions extends Options = Options> {
if (typeof parsedUrl.query === 'string') {
parsedUrl.query = parseQs(parsedUrl.query)
}
// in minimal mode we detect RSC revalidate if the .rsc path is requested
if (
this.minimalMode &&
(req.url.endsWith('.rsc') ||
(typeof req.headers['x-matched-path'] === 'string' &&
req.headers['x-matched-path'].endsWith('.rsc')))
) {
// in minimal mode we detect RSC revalidate if the .rsc
// path is requested
if (this.minimalMode && req.url.endsWith('.rsc')) {
parsedUrl.query.__nextDataReq = '1'
}

Expand Down