How can we improve Azure CDN?

CDN: Support Vary: Origin header.

The CDN ignores the Vary: Origin header, and thus the associated Access-Control-Allow-Origin is not emitted either. Even though the underlying blob store does return the correct Vary header, the CDN ignores this (basically breaking HTTP logic) and returns the same response to all users regardless of the origin (X-Cache: HIT) is then returned instead.

This is basically a flaw, a bug, and an oversight- but I'm not going to pay for Azure support to tell you this.

Without this functioning properly, the CDN cannot be used to host website resources (such as fonts) since these must all have Access-Control-Allow-Origin headers (a behavior ironically introduced by Microsoft with IE9, later adopted by Firefox, and soon to be adopted by Chrome).

79 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Sam Kelleher shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    planned  ·  Anton Kucer [MSFT] responded  · 

    Azure CDN by default ignores Vary header except when it is used with Vary: accept-encoding. This is done as the Vary header can easily cause serious cache bloat issues. Long term we are targeting feature to allow users to easily adjust this default behavior.

    9 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base