I'm experimenting with pushing redirects using nginxs http2_push_preload on;
directive.
In my application I detect redirects and add a Link: <location>; as=document; rel=preload
header that matches the Location
header.
This works well for some redirects, but fails for redirects where the resulting page depends on the value of a cookie (e.g. a cookie containing a session identifier).
While debugging I noticed that the "preload" request is missing the cookies that are available in the originating requests.
In fact only a subset of the original headers are sent in the "preload" request (Accept-*
and User-Agent
), headers like Cookie
and Referer
are missing.
How can I make nginx forward all headers of the original request to the preload request? Or is this not possible?