Vary: * incorrectly added to http header response (asp.net mvc3)

Viewed 1336

I am using the following output cache profile:

<add name="MyFunkyProfile" duration="180" varyByParam="*" location="ServerAndClient" />

In dev, I have a response header with one Vary entry:

HTTP/1.1 200 OK
Server: Microsoft-IIS/7.5
...
Vary: Accept-Encoding
Cache-Control: private, max-age=180, s-maxage=0
...

When I deploy my app, I have an extra Vary entry inserted in the response:

HTTP/1.1 200 OK
Server: nginx
...
Vary: Accept-Encoding
Cache-Control: private, max-age=180, s-maxage=0
...
Vary: *
...

Why this extra Vary entry? This is preventing the cache from working correctly.

Any ideas how to fix this?

2 Answers
Related