Replies: 1 comment
-
Figured it out. Here's an explanation: https://stackoverflow.com/a/77204648/210867 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello - I'm fairly new to APIFlask, but I have a small app that works fine locally. I can go to /docs to load the Swagger UI interface then use that to successfully test my endpoints.
However, when I deploy it to the staging environment and use Swagger UI to hit an endpoint, I get a NetworkError - and if I open the browser console, I see the following error:
Blocked loading mixed active content “http://MYHOST.com/foo”
(I replaced the real domain name with MYHOST for privacy, and
foo
is an endpoint I use for testing basic health.)The error message also includes a link to this reference: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content
I'm not an expert on this particular area, but I'm guessing it's because I'm using http locally, but using https in the staging environment, and when the Swagger UI is loaded via https and then tries to hit /foo using http, it triggers the Mixed Content error.
What's the fix for this?
Beta Was this translation helpful? Give feedback.
All reactions