New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 650289 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Service worker cannot fetch resource at http://localhost/

Reported by zhaoj...@gmail.com, Sep 26 2016

Issue description

UserAgent: 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  .
 

Comment 1 by eroman@chromium.org, Sep 26 2016

Cc: mkwst@chromium.org
Components: Blink>ServiceWorker
I think it is working as intended that you cannot access localhost in this case, although Mike can answer definitively if this is a bug.

Comment 2 by mkwst@chromium.org, Sep 27 2016

Status: WontFix (was: Unconfirmed)
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