因为我们保护 .PDF 文件免受匿名用户的侵害,所以我们有一个自定义处理程序,所以我们有一个条目
我们还对 http 标头进行了更改,以通过 IIS 7 管理添加“cache-control: no-cache,no-store”,这会在 system.webserver 元素下创建 web.config 条目,如下所示:
<httpProtocol>
<customHeaders>
<clear />
<add name="cache-control" value="no-cache,no-store" />
</customHeaders>
</httpProtocol>
Run Code Online (Sandbox Code Playgroud)
当我在 burpsuite 会话中查看响应标头时,我看到 .aspx 页面:cache-control: no-store,no-cache,no-store
但对于 PDF 页面:
缓存控制:私有,无缓存,无存储
我的目标是让一切都变成“无缓存,无存储”。我不确定我错过了什么。web.config 中没有其他缓存设置。请告知如何从 PDF 页面中删除“私人”以及如何从所有其他页面中删除额外的无商店。其他通过 System.Web.StaticFileHandler 的静态页面,它们也有“no-store,no-cache,no-store”。