gw2-api / issues

Issue tracker for the Guild Wars 2 API
https://discord.gg/zqeHCEg
16 stars 0 forks source link

Using `X-Schema-Version` header sometimes returns wrong schema #106

Open darthmaim opened 1 month ago

darthmaim commented 1 month ago

Current Behavior

Using the X-Schema-Version sometimes returns a wrong schema version.

This is probably caused by a wrong CloudFront configuration. CloudFront (which is used as a cache in front of the API) does not use the X-Schema-Version as part of the cache key per default, so it will return wrong schema versions if it has any request cached.

X-Schema-Version is also missing from the Vary header (which CloudFront ignores, but other layers in between (for example browser cache) might care about).

Expected Behavior

Steps To Reproduce

No response

Happening since

Always

Anything else?

For API consumers: Always use the v query parameter instead of the X-Schema-Version header to make sure the correct schema is used.