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

Mixed Content error with only https being used #548

Closed
jwalker5006 opened this issue Jan 20, 2021 · 2 comments
Closed

Mixed Content error with only https being used #548

jwalker5006 opened this issue Jan 20, 2021 · 2 comments

Comments

@jwalker5006
Copy link

jwalker5006 commented Jan 20, 2021

Pop up panel not fully rendering due to mixed content error. parent page is https, javascript references only http but javascript pushing http.

the site hosting RocketChat livechat javascript is https://subdomain.ourdomain.com

Server build is 3.9.3

  1. RocketChat site running https and reverse proxy
  2. Live Chat set to use https
  3. But when the live chat loads, I get a partial rendering (See image) and looking at inspect I get the following error

image

Console Error

Mixed Content: The page at 'https://www.ourdomain.com/' was loaded over HTTPS, but requested an insecure resource 'http://rc.ourdomain.com/api/v1/livechat/config?token=bunchofrandomstuff'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ VM823:formatted:44

Javascript used

        <script type="text/javascript">
            (function (w, d, s, u) {
                w.RocketChat = function (c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
                var h = d.getElementsByTagName(s)[0], j = d.createElement(s);
                j.async = true; j.src = 'https://rc.ourdomain.com/livechat/rocketchat-livechat.min.js?_=201903270000';
                h.parentNode.insertBefore(j, h);
            })(window, document, 'script', 'https://rc.ourdomain.com/livechat');
        </script>

I have been digging through rocketchat source code but cannot find out what in the code is trying to render http content

Originally posted by @jwalker5006 in #250 (comment)

@jwalker5006 jwalker5006 changed the title Mixed Content error with only https is used Mixed Content error with only https being used Jan 20, 2021
@Swayamsvk
Copy link

Is this issue still active?

@jwalker5006
Copy link
Author

I will close the issue. Upgrading to 3.11 seemed to fix the issue.

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

2 participants