什么是“X-Content-Type-Options=nosniff”? - What is “X-Content-Type-Options=nosniff”?

问题:

I am doing some penetration testing on my localhost with OWASP ZAP, and it keeps reporting this message:我正在使用 OWASP ZAP 在我的本地主机上进行一些渗透测试,它不断报告此消息:

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff' Anti-MIME-Sniffing 标头 X-Content-Type-Options 未设置为“nosniff”

This check is specific to Internet Explorer 8 and Google Chrome.此检查特定于 Internet Explorer 8 和 Google Chrome。 Ensure each page sets a Content-Type header and the X-CONTENT-TYPE-OPTIONS if the Content-Type header is unknown如果 Content-Type 标头未知,请确保每个页面都设置一个 Content-Type 标头和 X-CONTENT-TYPE-OPTIONS

I have no idea what this means, and I couldn't find anything online.我不知道这是什么意思,我在网上找不到任何东西。 I have tried adding:我试过添加:

<meta content="text/html; charset=UTF-8; X-Content-Type-Options=nosniff" http-equiv="Content-Type" />

but the I still get the alert.但我仍然收到警报。

What is the correct way of setting the parameter?设置参数的正确方法是什么?


解决方案:

参考一: https://stackoom.com/question/1EwSE
参考二: What is “X-Content-Type-Options=nosniff”?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章