# CORS Error when embedding comments in Gitlab-hosted Jekyll static site

**URL:** <https://meta.discourse.org/t/cors-error-when-embedding-comments-in-gitlab-hosted-jekyll-static-site/72194>\
**Category:** Support\
**Created:** [16 Ottobre 2017, 4:48pm UTC](https://meta.discourse.org/t/cors-error-when-embedding-comments-in-gitlab-hosted-jekyll-static-site/72194 "2017-10-16T16:48:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![chrishiero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrishiero/32/80566_2.png) [@chrishiero](https://meta.discourse.org/u/chrishiero)\
**Post date:** [16 Ottobre 2017, 4:48pm UTC](https://meta.discourse.org/t/cors-error-when-embedding-comments-in-gitlab-hosted-jekyll-static-site/72194/1 "2017-10-16T16:48:34Z")

</div>

New Discourse user here just trying to get a basic site skeleton up. So far, almost everything has been smooth except for getting the comment-embedding/post-generating functionality to work.

I have my Discourse instance running on a Digital Ocean droplet, as per the setup instructions.

My discourse url is: `http://discuss.singlebagtravel.com`  
My static site is located at: `http://singlebagtravel.com`

I have added: `DISCOURSE_ENABLE_CORS: true` to the `app.yml` file and re-launched.

I have set Settings \> Security \> cors origins to: `http://singlebagtravel.com`

The console on my static site where I embed the comments shows this:

> Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘[http://discuss.singlebagtravel.com](http://discuss.singlebagtravel.com)’) does not match the recipient window’s origin (‘[http://singlebagtravel.com](http://singlebagtravel.com)’)

There are a number of similar posts that I found in the forums that have helped me get this far, but none of the solutions suggested in any of them have worked for me. I feel like I may be missing something obvious here, because it seems like it _should_ work.

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/cors-error-when-embedding-comments-in-gitlab-hosted-jekyll-static-site/72194)._
