Content-Security-Policy
通過CSP present with safer baseline directives.
default-src 'self'; script-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'
對安全回應標頭進行通過/警告/失敗評分,並提供修復建議。
CSP present with safer baseline directives.
default-src 'self'; script-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'
HSTS is configured with strong baseline.
max-age=31536000; includeSubDomains; preload
Anti-clickjacking policy is configured.
DENY
MIME-sniffing protection is enabled.
nosniff
Referrer policy is privacy-conscious.
strict-origin-when-cross-origin
Permissions-Policy is present.
camera=(), microphone=(), geolocation=()
COOP is configured for isolation.
same-origin
CORP header is present.
same-origin
分析 HTTP 回應安全標頭,根據通過、警告、失敗狀態計分,並整理可直接複製的修復建議報告。
接受原始回應標頭文字,逐項檢查 CSP、HSTS、X-Frame-Options、Referrer-Policy 等常見標頭。
為每個標頭顯示 pass、warn、fail 狀態、目前值與建議修正方向。
可把總分摘要與逐項建議複製成報告,方便貼進稽核、PR 或安全工單。
完整樣本
HTTP/2 200 content-security-policy: default-src 'self'; object-src 'none' strict-transport-security: max-age=31536000; includeSubDomains x-frame-options: DENY
缺少 HSTS
content-security-policy: default-src 'self' x-content-type-options: nosniff
僅貼標頭區塊
referrer-policy: strict-origin-when-cross-origin permissions-policy: camera=(), microphone=()
分數摘要
Score: 8/10 (80%) Pass 6 Warn 2 Fail 0
單項結果
Content-Security-Policy PASS default-src 'self'; object-src 'none'
報告區段
Recommendations - Add HSTS with a long max-age - Tighten frame-ancestors or X-Frame-Options
貼入了 HTML 或整段 curl 輸出
只保留 HTTP 回應狀態列與標頭內容,避免混入 HTML 主體。
把 request header 當成 response header 分析
確認來源是伺服器回應標頭,不是瀏覽器送出的請求標頭。
看到 PASS 就直接忽略實際值
除了狀態,也要檢查標頭值是否符合你的部署與風險要求。
安全回應標頭分析器適合做快速靜態複核;是否達標仍需和實際伺服器設定、瀏覽器行為與安全政策一起驗證。
這個分數能代表站點完全安全嗎?
不能。它只評估一組常見安全標頭,仍需搭配其他安全測試與配置審查。
可以直接貼瀏覽器 Network 面板中的標頭嗎?
可以,只要保留回應標頭區塊即可。
為什麼同一個標頭會是 warning 而不是 fail?
代表標頭存在,但值不夠完整或不符合最佳實務,而不是完全缺失。