Cache-Control in IIs 7.5
I need to allow public caching in IIS 7.5. This is needed to make my CDN work since they honr host header caching requests.
I have added the following to the web.config for the site:
---begin---
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value=" public, max-age=31536000" />
</customHeaders>
</httpProtocol>
---end---
I get teh follwoing when I run curl:
---begin---
> Host: www.XXX.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 27 Sep 2010 17:08:53 GMT
< Server: Microsoft-IIS/7.5
< Cache-Control: private=,public=
< X-AspNetMvc-Version: 2.0
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Cache-Control: max-age=31536000
< Via: HTTP/1.1 www.XXX.com (MII-WSD/1.4)
< X-Pb-Mii: Powered by Mirror Image Internet
< Content-Type: text/html; charset=utf-8
< Content-Length: 15672
< Via: 1.1 bos101 (MII-APC/1.5)
---end---
September 27th, 2010 1:32pm