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

docs: Update Middleware docs on ignoring prefetches #56799

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

jvandenaardweg
Copy link
Contributor

@jvandenaardweg jvandenaardweg commented Oct 13, 2023

There's a discussion here on how to prevent App Router prefetches to go through the Middleware: #37736

It wasn't really clear how that works and if it is possible. But it seems like the docs on this are a little bit hidden on the CSP page: https://nextjs.org/docs/app/building-your-application/configuring/content-security-policy

The source and missing options are not documented on the Middleware page, so I think this PR adds some clarity to that.

The example is taken from the CSP docs.

Also verified the example in my own project.

@jvandenaardweg jvandenaardweg requested review from a team as code owners October 13, 2023 14:47
@jvandenaardweg jvandenaardweg requested review from S3Prototype and steven-tey and removed request for a team October 13, 2023 14:47
Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

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

Thank you!

@leerob leerob merged commit f8ba588 into vercel:canary Dec 27, 2023
31 checks passed
agustints pushed a commit to agustints/next.js that referenced this pull request Jan 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants