# Embedding Discourse Comments via Javascript over https

**URL:** https://meta.discourse.org/t/embedding-discourse-comments-via-javascript-over-https/138163
**Category:** Support
**Created:** [January 9, 2020, 4:28pm UTC](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript-over-https/138163 "2020-01-09T16:28:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pablogg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pablogg/32/164759_2.png) [@pablogg](https://meta.discourse.org/u/pablogg)
#### Post date: [January 9, 2020, 4:28pm UTC](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript-over-https/138163/1 "2020-01-09T16:28:51Z")

</div>

I get a lot of errors of mixed content because my website is in HTTPS and the discourse subdomain too.  
But the javascript embed code are trying to get HTTP links

```
    Uncaught (in promise) no-response: no-response :: [{"url":"http://discourse.domain.com/images/discourse-logo-sketch.png"}]
        at a.makeRequest (https://discourse.domain.com/javascripts/workbox/workbox-strategies.prod.js:1:2145)

_embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:6 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin '' in a call to 'postMessage'.
    at u (https://discourse.domain.com/assets/embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:1:105)
    at window.onload (https://discourse.domain.com/assets/embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:1:523)
u @ _embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:6
window.onload @ _embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:36
load (async)
(anonymous) @ _embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:25
(anonymous) @ _embed-application-590793ad7c35377ed13fcf562bc5faefeb2d67a33a71f1f98e420d6d94a31b4a.js:1

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 9, 2020, 6:22pm UTC](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript-over-https/138163/2 "2020-01-09T18:22:35Z")

</div>

Check your Discourse site settings for `force https`. Make sure it’s enabled.

---

<div class="post-metadata">

### Author: ![pablogg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pablogg/32/164759_2.png) [@pablogg](https://meta.discourse.org/u/pablogg)
#### Post date: [January 31, 2020, 5:50pm UTC](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript-over-https/138163/3 "2020-01-31T17:50:35Z")

</div>

Yes, it works fine now. Thanks

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 1, 2020, 5:57pm UTC](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript-over-https/138163/4 "2020-03-01T17:57:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
