Replies: 1 comment 1 reply
-
You can use the request and context in the loader and then the result in HeadersFunction |
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
We would like to be able to determine route headers based on the request or context. Our current use-case is that we have different cache-control headers for users vs bots and that is something we'd determine from the request (or possibly context if we add it there before processing the request). We have a number of other use-case (mostly around cache-control headers) but I can see this being useful for other headers too.
The current
HeadersFunction
interface does not appear to support my use-case currently.Note: We're in the process of upgrading to RR7 so perhaps there is a better way to do this but it seems like adding the request and context like our route functions would be beneficial.
Beta Was this translation helpful? Give feedback.
All reactions