-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: strip _rsc query for client navigation rsc request (#65084)
When you do client navigation to a dynamic page with call like `headers()`, it wil send RSC request for that page. We want to skip the `_rsc` query in the logging as it's disruptive. Closes NEXT-3077 Closes #64355
- Loading branch information
Showing
7 changed files
with
76 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { headers } from 'next/headers' | ||
|
||
export default function Page() { | ||
headers() | ||
return <p>{'headers()'}</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
import Link from 'next/link' | ||
|
||
export default function Layout({ children }) { | ||
return ( | ||
<html> | ||
<body>{children}</body> | ||
<body> | ||
<header> | ||
<Link id="nav-link" href={'/link'}> | ||
/link | ||
</Link> | ||
<br /> | ||
<Link id="nav-headers" href={'/headers'}> | ||
/headers | ||
</Link> | ||
<br /> | ||
<Link id="nav-default-cache" href={'/default-cache'}> | ||
/default-cache | ||
</Link> | ||
<br /> | ||
<Link id="nav-cache-revalidate" href={'/cache-revalidate'}> | ||
/cache-revalidate | ||
</Link> | ||
<br /> | ||
</header> | ||
<div>{children}</div> | ||
</body> | ||
</html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import Link from 'next/link' | ||
|
||
export default function Page() { | ||
return <Link href="/foo">Trigger RSC request</Link> | ||
return ( | ||
<Link id="foo" href="/foo"> | ||
Trigger RSC request | ||
</Link> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters