This tutorial will show you how to remove the request header from a request between the MaxCDN edge server and your origin. In some cases, the origin should not generate different versions of the same file, so it’s wise to either disable the processing of the header (ex: Vary) or remove the header altogether from the request. You can do this with EdgeRules in your MaxCDN Control Panel.
The EdgeRules feature is available only on Enterprise plans.
Remove request header in settings
Nginx Configuration Block
location / {
proxy_set_header Vary '';
}
CURL Examples
For testing purposes, we’ve set up our origin to respond with a header called “ID” and value “1” if there is a Vary header in the request. We’ve also removed Vary by using the aforementioned rule on the CDN side. We then re-tested.
curl -I gbgcl13.netdnasa2.netdna-cdn.com/ -H 'Vary: "Accept"'
HTTP/1.1 200 OK
Date: Wed, 23 Sep 2015 18:20:45 GMT
Content-Type: text/html
Content-Length: 935
Last-Modified: Thu, 06 Aug 2015 12:32:59 GMT
Cache-Control: public, must-revalidate, proxy-revalidate
ID: 1
Server: NetDNA-cache/2.2
X-Cache: MISS
Accept-Ranges: bytes
Without Vary
curl -I gbgcl13.netdnasa2.netdna-cdn.com/ -H 'Vary: "a"'
HTTP/1.1 200 OK
Date: Wed, 23 Sep 2015 18:23:02 GMT
Content-Type: text/html
Content-Length: 935
Connection: keep-alive
Last-Modified: Thu, 06 Aug 2015 12:32:59 GMT
Cache-Control: public, must-revalidate, proxy-revalidate
X-Cache: HIT
Server: NetDNA-cache/2.2
X-Cache: MISS
Accept-Ranges: bytes
If you have any questions or experience any issues, please reach out to the Support Team, live chat and ticket support are available 24/7.