I currently use Akamai as a CDN for my app, which is served over multiple subdomains.
I recently realized that Akamai is caching CORS requests the same, regardless of the origin from which they were requested.
This of course causes clients that make requests with a different Origin
than the cached response to fail (since they have a different response header for Access-Control-Allow-Origin
than they should)
Many suggest supplying the Vary: Origin
request header to avoid this issue, but according to Akamai's docs and this Akamai community post, this isn't supported by Akamai.
How can I force Akamai to cache things uniquely by Origin
if an Origin
header is present in the request?