【发布时间】:2016-05-03 11:47:23
【问题描述】:
我已经在我的 web.config 中添加了 X-Content-Type-Options 标头,实际上它不会加载脚本,因为 response.contentType 是“text/html”。
现在,我将响应显式修改为:
Response.Clear();
Response.ContentType = "text/javascript";
调试器甚至会命中这些代码行,但最终ContentType 是“text/html”。
如何修改ContentType?
附:我在 IIS 6 上托管这个网站。
【问题讨论】:
标签: javascript .net iis-6