Cloudflare is caching my requests but it's ignoring the language header.
example request:
URL :
https://api.example.com/v1/places/?param=1¶m=2
Header :
Accept-Language : en
But no matter what the Accept-Language
value is, the first hit has the header respected (for example) en
, when I make the same request again with another language, say ar
, it loads english (the first language) again...
how can I make Cloudflare to respect the language for all languages (each different value), so that Cloudflare will make an entry for different languages.
or the only solution is adding the language as a query parameter?
PS: this is the page rule I'm using.
Browser Cache TTL: 30 minutes, Cache Level: Cache Everything, Edge Cache TTL: a month
They support custom cache keys via Page Rules on Enterprise plans.
https://support.cloudflare.com/hc/en-us/articles/115004290387-Using-Custom-Cache-Keys