在线文档教程

Upgrade-Insecure-Requests

Upgrade-Insecure-Requests

HTTP Upgrade-Insecure-Requests请求头向服务器发送一个信号,表示客户对加密和认证响应的偏好,并且它可以成功处理upgrade-insecure-requests CSP 指令。

Header typeRequest header
Forbidden header nameno

句法

Upgrade-Insecure-Requests: 1

例子

客户端向服务器请求它支持以下升级机制的信号upgrade-insecure-requests

GET / HTTP/1.1 Host: example.com Upgrade-Insecure-Requests: 1

服务器现在可以重定向到该网站的安全版本。一个Vary可以使用的头,这样的网站不会被缓存投放到不支持升级机制的客户。

Location: https://example.com/ Vary: Upgrade-Insecure-Requests

产品规格

SpecificationStatusComment
Upgrade Insecure RequestsThe definition of 'upgrade-insecure-requests' in that specification.Candidate RecommendationInitial definition.

浏览器兼容性

FeatureChromeFirefoxEdgeInternet ExplorerOperaSafari
Basic Support4448.0(No)1(No)31?

FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support?44(No)48.0?31?

  • Content-Security-Policy

  • CSP upgrade-insecure-requests