# Embedding comments issue

**URL:** https://meta.discourse.org/t/embedding-comments-issue/30439
**Category:** Support
**Created:** [June 25, 2015, 5:21am UTC](https://meta.discourse.org/t/embedding-comments-issue/30439 "2015-06-25T05:21:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![nigelb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nigelb/32/116279_2.png) [@nigelb](https://meta.discourse.org/u/nigelb)
#### Post date: [June 25, 2015, 5:21am UTC](https://meta.discourse.org/t/embedding-comments-issue/30439/1 "2015-06-25T05:21:12Z")

</div>

I’m trying to embed comments from my jekyll site into my discourse instance. I get this error in the chromium console when I load the jekyll instance.

```
GET http://discourse.nigelb.me/embed/comments?embed_url=http%3A%2F%2Fstaging.nigelb.me%2F2015-05-15-using-different-browser-profiles.html 403 (Forbidden) comments?embed_url=http%3A%2F%2Fstaging.nigelb.me%2F2015-05-15-using-different-browser-profiles.html:71
Uncaught TypeError: Cannot read property 'forEach' of undefined comments?embed_url=http%3A%2F%2Fstaging.nigelb.me%2F2015-05-15-using-different-browser-profiles.html:193
Uncaught TypeError: Cannot read property 'highlighted_languages' of undefined _application-d5ace90ab7605cd55c8f8dc132ddb904.js:9695

```

Test post: [http://staging.nigelb.me/2015-06-17-c25k-complete.html](http://staging.nigelb.me/2015-06-17-c25k-complete.html)

I’ve checked and re-checked the CORS settings, I’ve got the domain setup correctly in the settings. I’ve tried with and without the atom feeds and neither have worked. Nothing in the discourse logs give me much help. Any thoughts of what obvious mistake I’m making?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 25, 2015, 5:21pm UTC](https://meta.discourse.org/t/embedding-comments-issue/30439/2 "2015-06-25T17:21:23Z")

</div>

> [@nigelb](#):
>
> 403 (Forbidden)

That is a sign that the `embeddable hosts` is incorrect. Can you confirm the value is `staging.nigelb.me`?

---

<div class="post-metadata">

### Author: ![nigelb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nigelb/32/116279_2.png) [@nigelb](https://meta.discourse.org/u/nigelb)
#### Post date: [June 26, 2015, 1:26am UTC](https://meta.discourse.org/t/embedding-comments-issue/30439/3 "2015-06-26T01:26:15Z")

</div>

I’ve verified this a few times and I can say with a good guarantee that this is right. Looks like I have the same problem as [this](https://meta.discourse.org/t/how-can-i-troubleshoot-discourse-comments-embedding-feature/30323/10) thread.

---

<div class="post-metadata">

### Author: ![jmamazo](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@jmamazo](https://meta.discourse.org/u/jmamazo)
#### Post date: [June 26, 2015, 12:20pm UTC](https://meta.discourse.org/t/embedding-comments-issue/30439/4 "2015-06-26T12:20:52Z")

</div>

I think there is a problem here.  
I get the same errors and I have tried everything I could think of, I am 99.999% sure my set up is correct.  
I am using v1.4.0.beta3 +99 1.4.0.beta3  
Both machines are using SSL and using add\_header Strict-Transport-Security, I initially suspected that SSL must be doing something strange, but seems to be unrelated.

Those guys say that v1.4.0.beta1 seems to be working, but I dont know how to downgrade yet.  
Discourse is running on [https://forum.domain.com](https://forum.domain.com)  
my test site is running on [https://webdev.domain.com](https://webdev.domain.com)

my sample index page has

```
<!DOCTYPE html>
<html>
<head lang="en">

    <script src="jquery.js"></script>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<h1>Hallo World!</h1>
<h2>How are you?</h2>

<div id="discourse-comments"></div>

<script type="text/javascript">
  var discourseUrl = "https://forum.domain.com/",
      discourseEmbedUrl = 'https://webdev.domain.com/discourse-embedded-test/index.html';

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
      d.src = discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();
</script>

</body>
</html>

```

embeddable hosts: [webdev.domain.com](http://webdev.domain.com)

I have not set (Although I have tried):

feed polling enabled  
feed polling url  
embed category

Perhaps I am omitting something really stupid

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [June 26, 2015, 4:17pm UTC](https://meta.discourse.org/t/embedding-comments-issue/30439/5 "2015-06-26T16:17:28Z")

</div>

@eviltrout just fixed this:

[https://github.com/discourse/discourse/commit/008dd967217f844c1ad0eb989030c6250d673b69](https://github.com/discourse/discourse/commit/008dd967217f844c1ad0eb989030c6250d673b69)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 26, 2015, 7:41pm UTC](https://meta.discourse.org/t/embedding-comments-issue/30439/6 "2015-06-26T19:41:47Z")

</div>


