Service worker cannot fetch resource at http://localhost/
Reported by
zhaoj...@gmail.com,
Sep 26 2016
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 Steps to reproduce the problem: 1. register server worker at https site 2. fetch resource at http://localhost at service worker What is the expected behavior? fetch success. What went wrong? fetch is blocked with error : Mixed Content: The page at 'https://www.mysite.info/sw.js' was loaded over HTTPS, but requested an insecure resource 'http://localhost/my.mp4'. This request has been blocked; the content must be served over HTTPS. Did this work before? N/A Chrome version: 53.0.2785.116 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 23.0 r0 statement " However http://localhost is also considered a secure origin, " at https://www.chromium.org/blink/serviceworker/service-worker-faq .
,
Sep 27 2016
Correct. `http://localhost` is mixed content. `http://127.0.0.1` will work for you, however. Yes, this is somewhat absurd. See https://github.com/w3c/webappsec-secure-contexts/issues/43 for some discussion, and https://tools.ietf.org/html/draft-west-let-localhost-be-localhost for how I'd like to address it in the future. For now, however, this is WontFix. |
||
►
Sign in to add a comment |
||
Comment 1 by eroman@chromium.org
, Sep 26 2016Components: Blink>ServiceWorker