大网数据广告活动
网站运营与故障问答

When should I not to use page meta security headers

· 52CE 我爱测

When should I not to use page meta security headers? For example, I configured the web server server-side with a powerful content security policy and other hardened security headers, but when review my Security research, assessme…

问题原文

原帖链接 · morgansbyers · CC BY-SA 3.0

When should I not to use page meta security headers?

For example, I configured the web server server-side with a powerful content security policy and other hardened security headers, but when review my Security research, assessment, analytics of my Page meta security headers they fail?

What I think is the difference between page meta and server-side headers is page meta is page per page meaning and server-side is global. So should I define the unsecure page meta header results as a false positive or bug?

已采纳解答

原帖链接 · Tom Brossman · CC BY-SA 3.0

I think you are asking about a conflict between HTTP headers versus page meta elements, correct? If yes, you should use HTTP headers and remove the page meta elements (at least the ones for security) as they are unnecessary.

HTTP headers take priority over page meta elements, and HTTP headers are cached by intermediate proxies but page meta elements may not be.

If you are using a scanning tool that expects to see a certain page meta element in the <head> that you properly configured as a HTTP header, you can consider that a bug with the scanner and keep using the HTTP header.

Here is a good resource for testing your HTTP headers: securityheaders.io

Also, here is a good resource for configuring your Content Security Policy: content-security-policy.com

If you have a specific error you need help with then please edit your question with the error message, otherwise refer to the general guidance above.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。