Hello,
Our site name is gatsby-chefclub.netlify.app
We use redirects to proxy our backend.
One or our backend route answers differently based on the Accept
header: it will either give a direct JSON response or a 301 redirection depending on this header.
Our backend’s response also sends a Vary
header with the Accept
value, so any cache should include the client’s Accept header.
But it seems that Netlify doesn’t respect the Vary
header.
We made 2 cUrl requests to the same URL, with different Accept headers (one with application/json-redirect+json
and the other with text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
), and both answers were the same.
x-nf-request-ids are d2bbd229-5596-456f-b0f2-f006c089cf93-16005669 and d2bbd229-5596-456f-b0f2-f006c089cf93-16011194
Could you confirm? And if confirmed, do you have a solution?
Thanks,
Sylvain