{"id":8886,"date":"2016-11-29T06:00:33","date_gmt":"2016-11-28T21:00:33","guid":{"rendered":"https:\/\/www.suzukikenichi.com\/blog\/?p=8886"},"modified":"2019-11-17T11:10:15","modified_gmt":"2019-11-17T02:10:15","slug":"content-security-policy-upgrade-insecure-requests-can-resolve-mixed-content","status":"publish","type":"post","link":"https:\/\/www.suzukikenichi.com\/blog\/content-security-policy-upgrade-insecure-requests-can-resolve-mixed-content\/","title":{"rendered":"&#8220;Content-Security-Policy: upgrade-insecure-requests&#8221;\u3067HTTPS\u30da\u30fc\u30b8\u306e\u6df7\u5728\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u89e3\u6d88\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p class=\"p20-b al-r small\">[\u30ec\u30d9\u30eb: \u4e0a\u7d1a]<\/p>\n<p class=\"p60-b\">\u5b89\u5168\u306aHTTPS\u3067\u901a\u4fe1\u3059\u308b\u30da\u30fc\u30b8\u3067\u3001\u5b89\u5168\u3067\u306f\u306a\u3044HTTP\u3067\u8aad\u307f\u8fbc\u307e\u305b\u308b\u30ea\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3059\u308b\u3068\u3001\u300c\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u300d \u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<br \/>\n<strong>Content-Security-Policy: upgrade-insecure-requests<\/strong> \u3068\u3044\u3046\u4ed5\u7d44\u307f\u3092\u4f7f\u3046\u3068\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u5834\u5408\u3067\u3082HTTPS\u3067\u5f37\u5236\u7684\u306b\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\n\u3064\u307e\u308a\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>HTTPS\u30da\u30fc\u30b8\u3067HTTP\u8aad\u307f\u8fbc\u307f\u3055\u305b\u308b\u3068\u300c\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u300d\u304c\u767a\u751f<\/h2>\n<p>\u305f\u3068\u3048\u3070\u3001HTTPS\u306e\u30da\u30fc\u30b8\u306b\u6b21\u306e\u3088\u3046\u306a\u753b\u50cf\u306e\u30bf\u30b0\u304c\u66f8\u304b\u308c\u3066\u3044\u305f\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><code>&lt;img src=\"<strong class=\"red\">http<\/strong>:\/\/example.com\/image.jpg\"&gt;<\/code><\/p>\n<p>src\u5c5e\u6027\u304c\u3001https \u3067\u306f\u306a\u304f http \u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u72b6\u614b\u3060\u3068\u30d6\u30e9\u30a6\u30b6\u3067\u306f\u6df7\u5728\u30b3\u30f3\u30c6\u30f3\u30c4 (Mixed content) \u304c\u691c\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" itemprop=\"image\" src=\"\/\/www.suzukikenichi.com\/images\/mixed-content-microsoft.png\" alt=\"Mixed content reported on Security Panel\" width=\"705\" height=\"430\" \/><\/p>\n<p>\u5b8c\u5168\u306b\u306f\u5b89\u5168\u3067\u306f\u306a\u3044\u305f\u3081\u30a2\u30c9\u30ec\u30b9\u6b04\u306b\u306f\u9375\u30de\u30fc\u30af\u306f\u4ed8\u304d\u307e\u305b\u3093\u3002<\/p>\n<p class=\"p40-b\">\u30d6\u30e9\u30a6\u30b6\uff08\u3068\u305d\u306e\u8a2d\u5b9a\uff09\u306b\u3088\u3063\u3066\u306f\u3001HTTP\u30b3\u30f3\u30c6\u30f3\u30c4\u306f\u30d6\u30ed\u30c3\u30af\u3055\u308c\u8aad\u307f\u8fbc\u307e\u308c\u306a\u3044\u3053\u3068\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>Content-Security-Policy\u3067HTTPS\u8aad\u307f\u8fbc\u307f\u3092\u5f37\u5236<\/h2>\n<p>\u3053\u3053\u3067\u5f79\u306b\u7acb\u3064\u306e\u304c\u3001<a href=\"https:\/\/developers.google.com\/web\/fundamentals\/security\/csp\/\">Content-Security-Policy<\/a> \u306e <a href=\"https:\/\/developers.google.com\/web\/fundamentals\/security\/prevent-mixed-content\/fixing-mixed-content#upgrading_insecure_requests\">upgrading insecure request<\/a> \u3067\u3059\u3002<br \/>\nContent-Security-Policy \u306b\u65b0\u305f\u306b\u8ffd\u52a0\u3055\u308c\u305f\u4ed5\u69d8\u3067\u3059\u3002<\/p>\n<p class=\"p40-b\">Upgrading insecure request \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001HTTPS\u30da\u30fc\u30b8\u3067HTTP\u8aad\u307f\u8fbc\u307f\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306f\u305d\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092HTTP\u3067\u306f\u306a\u304fHTTPS\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<br \/>\n\u3057\u305f\u304c\u3063\u3066\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2>Upgrade-insecure-requests \u306e\u8a2d\u5b9a\u65b9\u6cd5<\/h2>\n<p>Content-Security-Policy \u306e upgrade-insecure-requests \u306f\u3001HTTP\u30d8\u30c3\u30c0\u30fc\u304b\u3042\u308b\u3044\u306fmeta\u30bf\u30b0\u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>HTTP \u30d8\u30c3\u30c0\u30fc<\/h3>\n<p>HTTP\u30d8\u30c3\u30c0\u30fc\u3067\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306f\u3001.htaccess\uff08\u307e\u305f\u306f\u3001httpd.conf\uff09\u306b\u6b21\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><code>Header set Content-Security-Policy: upgrade-insecure-requests<\/code><\/p>\n<h3>meta \u30bf\u30b0<\/h3>\n<p>meta \u30bf\u30b0\u3067\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306f\u3001\u6b21\u3092HTML\u306ehead\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><code>&lt;meta http-equiv=\"Content-Security-Policy\" content=\"upgrade-insecure-requests\"&gt;<\/code><\/p>\n<p class=\"p40-b\">HTTP \u30d8\u30c3\u30c0\u30fc\u307e\u305f\u306f meta \u30bf\u30b0 \u306e\u3044\u305a\u308c\u304b\u3067 upgrade-insecure-requests \u3092\u8a2d\u5b9a\u3059\u308c\u3070\u3001HTTPS\u30da\u30fc\u30b8\u3067\u306eHTTP\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u30d6\u30e9\u30a6\u30b6\u306fHTTPS\u3067\u8aad\u307f\u8fbc\u3082\u3046\u3068\u3057\u307e\u3059\u3002<br \/>\n\u305d\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u3082\u3057HTTP\u3067\u5165\u624b\u3067\u304d\u306a\u3044\u969b\u306f\u3001\u901a\u5e38\u3069\u304a\u308aHTTP\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\uff08\u3082\u3061\u308d\u3093\u7d50\u679c\u3068\u3057\u3066\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u30a8\u30e9\u30fc\u304c\u51fa\u308b\uff09\u3002<\/p>\n<h2>\u5bfe\u5fdc\u3059\u308b\u30d6\u30e9\u30a6\u30b6<\/h2>\n<p>upgrade-insecure-requests \u306f\u65b0\u3057\u3044\u4ed5\u69d8\u3067\u3059\u3002<br \/>\n\u5bfe\u5fdc\u3059\u308b\u30d6\u30e9\u30a6\u30b6\u3092\u8abf\u3079\u305f\u306e\u3067\u3059\u304c\u3001\u8abf\u3079\u304d\u308c\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u5c11\u306a\u304f\u3068\u3082\u3001\u6700\u65b0\u306eChrome\u3068Firefox\u306f\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>Content Security Policy \u306b\u306f\u3001CSP1.0 \u3068 CSP Level 2 \u306e2\u3064\u304c\u3042\u308a\u3001Safari \u3068 Internet Explorer \u306f CSP Level 2 \u3092\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\nupgrade-insecure-requests \u304c CSP Level 2 \u306b\u542b\u307e\u308c\u308b\u306a\u3089 Safari \u3068 IE \u306f\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u305d\u3046\u3067\u3059\uff08\u3069\u306a\u305f\u304b\u306b\u3001upgrade-insecure-requests\u306e\u30d6\u30e9\u30a6\u30b6\u30b5\u30dd\u30fc\u30c8\u72b6\u6cc1\u3092\u8abf\u3079\u3066\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\uff09\u3002<\/p>\n<p class=\"p60-t\">\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u306f\u30b3\u30fc\u30c9\u30ec\u30d9\u30eb\u3067\u89e3\u6d88\u3059\u308b\u3053\u3068\u304c\u6700\u3082\u9069\u5207\u306a\u5bfe\u5fdc\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3057\u3001\u5927\u898f\u6a21\u306a\u30b5\u30a4\u30c8\u306b\u306a\u308b\u3068\u5b8c\u74a7\u306a\u5bfe\u5fdc\u304c\u96e3\u3057\u3044\u3053\u3068\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002<br \/>\n<a href=\"https:\/\/www.suzukikenichi.com\/blog\/what-i-have-done-to-switch-my-blog-to-full-https\/\">HTTPS\u79fb\u884c\u6642<\/a>\u306b\u767a\u751f\u3059\u308b\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u306e&#8221;\u5fdc\u6025\u7684&#8221;\u306a\u51e6\u7f6e\u3068\u3057\u3066 upgrade-insecure-requests \u306f\u5f79\u7acb\u3061\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>Content-Security-Policy \u306b\u306f\u3001\u307b\u304b\u306b\u3082\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u767a\u898b\u3057\u3066\u30ed\u30b0\u306b\u51fa\u529b\u3060\u3051\u3057\u305f\u308a\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5b8c\u5168\u306b\u30d6\u30ed\u30c3\u30af\u3059\u308b\u306a\u3069\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u304f\u308f\u3057\u304f\u306f\u3001Google\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30b5\u30a4\u30c8\u306e<a href=\"https:\/\/developers.google.com\/web\/fundamentals\/security\/prevent-mixed-content\/fixing-mixed-content\">Mixed Content\u89e3\u8aac\u30da\u30fc\u30b8<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[h\/t <a href=\"https:\/\/twitter.com\/tomayac\/status\/801772928371134464\">Thomas Steiner<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u5168\u306aHTTPS\u3067\u901a\u4fe1\u3059\u308b\u30da\u30fc\u30b8\u3067\u5b89\u5168\u3067\u306f\u306a\u3044HTTP\u3067\u8aad\u307f\u8fbc\u307e\u305b\u308b\u30ea\u30bd\u30fc\u30b9\u304c\u5b58\u5728\u3059\u308b\u3068\u3001\u300c\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4 (Mixed content)\u300d \u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3002Content-Security-Policy: upgrade-insecure-requests \u3068\u3044\u3046\u4ed5\u7d44\u307f\u3092\u4f7f\u3046\u3068\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u5834\u5408\u3067\u3082HTTPS\u3067\u5f37\u5236\u7684\u306b\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3002\u3064\u307e\u308a\u3001\u6df7\u5728\u3059\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[703,1296,1522],"class_list":["post-8886","post","type-post","status-publish","format-standard","category-net-marketing","tag-ssl","tag-upgrade-insecure-requests","tag-mixed-content"],"_links":{"self":[{"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/posts\/8886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/comments?post=8886"}],"version-history":[{"count":0,"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/posts\/8886\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/media?parent=8886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/categories?post=8886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suzukikenichi.com\/blog\/wp-json\/wp\/v2\/tags?post=8886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}