next.js
12bfa97e - conditionally send Next-URL in Vary response (#61794)

Commit
2 years ago
conditionally send Next-URL in Vary response (#61794) To ensure that we properly cache data for routes that change based on `Next-URL` (which is used for route interception), this adjusts how we set the `Vary` header to conditionally include `Next-URL`. The `Next-URL` request header only impacts the response for routes that are intercepted. When we detect that path we're handling could be intercepted, we add `Next-URL` to the vary. This signals in #61235 to prefix these cache entries with `nextUrl` if the response might vary based on it. Closes NEXT-2398
Author
Parents
Loading