none
FAULTY: Azure CDN ignores 'Vary: Origin' header.

    Question

  • The blob storage has CORS enabled and a few origins set as per the details at http://msdn.microsoft.com/en-us/library/azure/dn535601.aspx

    When requesting files from the blob store directly, it performs the correct expected documented behaviour - i.e. it adds the Access-Control-Allow-Origin header in the response, aswell as the Vary: Origin header to let proxies, CDNs etc know that caching to take place per domain name.

    HOWEVER, when requesting the same file via the linked Azure CDN tied to that blob store, it does not return any Vary or Access-Control-Allow-Origin header. It returns the same response for any origin. I.e. the CDN has not respected the Vary: Origin policy and is returning the same response to all origins.

    For information, I'm also using 'Cache-Control: public, no-transform, max-age=63113851' - but even if I set a new file with a short TTL, and make the first request, the CDN does indeed ignore the Vary header and strip out the CORS response headers.

    Is the CDN not compatible with Vary headers?

    Saturday, August 9, 2014 6:49 AM

Answers

All replies