【发布时间】:2016-01-20 14:33:05
【问题描述】:
我有一个小问题。这就是我的 web.config 的样子:
<add name="Cache-Control" value="no-cache, no-store, must-revalidate, private" />
<add name="Pragma" value="no-cache" />
但是当我检查 ZAP 工具时,我有这样的东西:
Cache-Control: no-cache,no-cache, no-store, must-revalidate, private
Pragma: no-cache,no-cache
因此,pragma 中的值是重复的,在某些响应中,Cache-Control 的开头也有“public”,例如:
Cache-Control: public, no-cache, no-cache, no-store, must-revalidate, private
有没有办法只设置我的 web.config 中的标头?
另一个问题是,有没有办法在主响应中设置标头,但在响应为 .css 和 .js 文件时禁用它们?我希望它们被缓存。
【问题讨论】:
标签: asp.net web http-headers request