Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Chrome 43でUpgrade Insecure Requestsに対応してた - ASnoKaze blog
[go: Go Back, main page]

Chrome 43でUpgrade Insecure Requestsに対応してた

Upgrade Insecure Requests

W3Cの仕様でUpgrade Insecure Requestsというものがある。


サブリソースのhttp://へのリクエストを自動でhttps://のものに変更する(下のデモサイトの例が分かりやすい。


指定方法としては以下の二通りである。

HTTPレスポンスヘッダで指定する

Content-Security-Policy: upgrade-insecure-requests


もしくはmetaタグで指定する

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

試してみる

デモサイトが公開されている
https://googlechrome.github.io/samples/csp-upgrade-insecure-requests/index.html


このサイトはhttpsで提供されているが、http://のリソースが埋め込まれている。

<img src="http://googlechrome.github.io/samples/images/touch/chrome-touch-icon-192x192.png">


そのため、Upgrade Insecure Requestsに対応していないchrome 42ではその旨の警告が表示される。



chrome 42では、リソース自体はhttp://で定義されているもののリクエストはhttps://でリクエストがされていることが分かる。
また、警告も表示されない。