Your error is pretty obvious from what I can see:
Your main website url uses https://
but your script subdomain uses http://
, and as modern browsers have a fully-safe-domain policy currently (no different protocols for loading resources, all should be on the same protocol as the main domain, aka the one you accessed the website through), your subdomain should also use https://
or your main domain should use http://
.
As stated on MDN's page about mixed content most browsers only let mixed passive/display content
(<img>
, <audio>
, <video>
and <object>(subresources)
) load through mixed content, but rather <script>
, <link>
, XMLHttpRequest
, <iframe>
, in-css url()
and <object>(data attribute)
are active content
and as such, could be subject to a Man-in-the-middle attack, therefore browsers do not allow loading of active content in a mixed environment (tl;dr use https for both js and your main website or http both js and main website).
It is also worth to note that the inverse (resources on https://
and main page on http://
) works as expected because the https connection to the resource is not subject to man in the middle attacks and since the page is on http://
browsers do not consider it a "security critical area" so you are able to load content through both http://
and https://