Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Mixed content error #1089

Open
tmechsner opened this issue Aug 20, 2021 · 0 comments
Open

Mixed content error #1089

tmechsner opened this issue Aug 20, 2021 · 0 comments

Comments

@tmechsner
Copy link

tmechsner commented Aug 20, 2021

What I'm trying to achieve

I've been playing around with saleor a few days now and come across diverse errors in a production-like test setup. The build process works fine and running backend and storefront locally works fine too. However, in the production-like setup, the storefront sends requests to "https://my-domain/account/". The response header includes Location: http://my-domain:8080/account/ which results in the following error message in the console:

Mixed Content: The page at 'https://my-domain/service-worker.js' was loaded over HTTPS, but requested an insecure resource 'http://my-domain:8080/account/'. This request has been blocked; the content must be served over HTTPS.

And then, probably related to this:

Uncaught (in promise) TypeError: Failed to fetch (service-worker.js:1)
Uncaught (in promise) DOMException: Failed to update a ServiceWorker for scope ('https://my-domain/') with script ('Unknown'): The object is in an invalid state. (my-domain/:1)

In my local setup (running with next dev) the storefront landingpage does not send a request to "/account". Why does it do so in production?
No configuration anywhere uses non-secure "http" and no configuration anywhere contains the "8080", except for the nginx configuration.

Steps to reproduce the problem

Deploy the latest 3.0 Version of the backend and the storefront via docker (build with github actions, deploy to sloppy.io), load demo data, go to the storefront landingpage.
The Dockerfile is almost identical to the original one, except that nginx is configured to listen on port 8080 which is then mapped to port 80 in the hosting setup, and the nginx server_name has been adjusted.

What I expected to happen

No errors in the console.

System information
Browser and OS should not matter here, as in a local setup everything works fine.
The production-like test setup runs on sloppy.io (docker hosting).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant