新上线Plus 套餐和 API 与 MCP 已上线:在你自己的系统中调用 175 个工具。
100www

工具 39 · C12 · 编码 / 开发 · 2026 年 11 月更新

HTTP 头参考

搜索常见 HTTP 头,查看用途、分类和示例值。

浏览器 免费 无需注册
工作原理
100www.dev/tools/http-header-reference
Content-Security-PolicySecurity

Restricts which sources scripts, styles, images and frames may load.

default-src 'self'; img-src 'self' https: data:
Strict-Transport-SecuritySecurity

Forces HTTPS for future visits and can request preload.

max-age=31536000; includeSubDomains; preload
X-Content-Type-OptionsSecurity

Stops MIME sniffing.

nosniff
X-Frame-OptionsSecurity

Legacy clickjacking protection; frame-ancestors supersedes it.

DENY
Referrer-PolicyPrivacy

Controls how much referrer information is sent.

strict-origin-when-cross-origin
Permissions-PolicyPrivacy

Disables browser features the page does not need.

camera=(), microphone=(), geolocation=()
Cache-ControlCaching

Controls browser and CDN caching.

public, max-age=3600, s-maxage=86400
ETagCaching

Opaque validator for conditional requests.

"abc123"
VaryCaching

Selects cache variants by request header.

Accept-Encoding
Content-EncodingPerformance

Declares the compression applied to the body.

br
Content-LengthMetadata

Body size in bytes.

12345
Content-TypeMetadata

Declares the media type and charset.

text/html; charset=utf-8
LocationRedirects

Target of a 3xx redirect.

https://example.com/new
Access-Control-Allow-OriginCORS

Declares which origins may read the response.

https://app.example.com
Cross-Origin-Opener-PolicySecurity

Isolates the browsing context.

same-origin
Cross-Origin-Resource-PolicySecurity

Restricts which sites may embed the resource.

same-origin

这个工具做什么

HTTP 头承载安全策略、缓存、内容类型、CORS 与计时信息。快速参考有助于阅读响应或编写配置。

工作原理

工具在一组精选常见头中查询,返回用途与示例值。

工具返回用途与可安全作为起点的示例值。

按应用调整示例。一个站点有效的头在另一个站点可能出问题,尤其是 CSP 与 CORS。

什么时候用

  • 解释扫描结果中的头。
  • 起草安全头配置。

术语表

响应头
服务器随响应发送的元数据。
CORS
控制跨源浏览器读取的规则。
CSP
限制页面可加载哪些脚本、样式和其他资源的响应头。

常见问题

这是完整 RFC 列表吗?+

不是,是精选的安全、缓存与 CORS 头。

示例可直接上线吗?+

可作为起点,需按应用调整。

哪些头对安全最重要?+

CSP、HSTS、X-Content-Type-Options、Referrer-Policy、Permissions-Policy 与框架保护是常见基线。

加头一定能提升安全吗?+

不,错误配置的 CSP 或 HSTS 可能破坏站点或锁死用户,部署前要测试。

为什么包含 Cache-Control 与 Vary?+

缓存错误会导致过期或错误语言响应,这是信任与正确性问题,不只是性能。

API 与 MCP

没有 API 端点

此工具完全在浏览器中运行,不提供 REST API 或 MCP。

可分享的结果

https://100www.dev/zh/tools/http-header-reference?q=Content-Security-Policy

100www

100www 工程团队

编辑

审核:Steve · · 报告错误

从 100www 探针网络测试;结果会因位置与网络而异。