Upgrade-Insecure-Requests
HTTP の Upgrade-Insecure-Requests リクエストヘッダーは、暗号化および認証されたレスポンスに対するクライアントの設定を表す信号をサーバーに送信し、 CSP の upgrade-insecure-requests ディレクティブが正常に処理できることを示します。
構文
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
仕様書
| Specification |
|---|
| Upgrade Insecure Requests # preference |
ブラウザーの互換性
BCD tables only load in the browser
関連情報
Content-Security-Policy- CSP
upgrade-insecure-requestsディレクティブ