I’m using Azure Front Door in Premium Tier. I have caching enabled on my route (CDN).
I have some troubles, which seems to be the result of the fact that CDN ignores the Vary
header.
I have made this test:
C:UsersTomaszMadeyski>curl -H "Next-Url: 123" -sS -D - https://my.page.at.frontdoor.com -o /dev/null
HTTP/1.1 200 OK
Date: Fri, 12 Jul 2024 09:59:38 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
cache-control: public, max-age=3600, stale-while-revalidate=3600
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url
x-azure-ref: 20240712T095938Z-1688db7465dw7s2w5364ydfyf4000000062g00000001m8hq
X-Cache: TCP_HIT
x-fd-int-roxy-purgeid: 37
X-Cache-Info: L1_T2
curl: (23) Failure writing output to destination, passed 11365 returned 4294967295
C:UsersTomaszMadeyski>curl -H "Next-Url: 1234" -sS -D - https://my.page.at.frontdoor.com -o /dev/null
HTTP/1.1 200 OK
Date: Fri, 12 Jul 2024 10:02:34 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
cache-control: public, max-age=3600, stale-while-revalidate=3600
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url
x-azure-ref: 20240712T100234Z-1688db7465djbxcc9gu32zk19800000006eg000000001ytv
X-Cache: TCP_HIT
x-fd-int-roxy-purgeid: 37
As you can see in the response I have Vary
header, one of its values is Next-Url
. So I would expect not to get TCP_HIT
response from CDN while I specify different values of Next-Url
header.
My conclusion: Vary
header is ignored by Front Door’s CDN.
Is this wrong conclusion?
Is there a way to make Front Door’s CDN to respect the value of Vary
header?