# Making discourseEmbedURL match expected topic requirements

**URL:** <https://meta.discourse.org/t/making-discourseembedurl-match-expected-topic-requirements/48660>\
**Category:** Product Support\
**Created:** [August 15, 2016, 4:59pm UTC](https://meta.discourse.org/t/making-discourseembedurl-match-expected-topic-requirements/48660 "2016-08-15T16:59:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Jeff\_Doran](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@Jeff\_Doran](https://meta.discourse.org/u/Jeff_Doran)\
**Post date:** [August 15, 2016, 9:16pm UTC](https://meta.discourse.org/t/making-discourseembedurl-match-expected-topic-requirements/48660/3 "2016-08-15T21:16:11Z")

</div>

Thanks Vinoth. I’m testing that idea on a public site, but now I’m running into an error loading the embed.js. I may not have mentioned, but we’re also using google oauth2 to control access to this site. I’ve added [https://meda.discourse.org/auth/google\_oauth2/callback](https://meda.discourse.org/auth/google_oauth2/callback) for the login callback but it looks like we may need to host the embed.js locally unless there are other suggestions.  
Since I’m testing in Safari, I tried changing the discourseUrl to ‘[https://citadel-discussion.lexmachina.com/](https://citadel-discussion.lexmachina.com/)’ so that both would be in the same https domain, but that resulted in an ERR\_CONNECTION\_REFUSED response.

- Jeff

`[blocked] The page at https://citadel-gauth.stage.lexmachina.com/cases/88 was not allowed to run insecure content from http://citadel-discussion.lexmachina.com/javascripts/embed.js.`

BTW, the update javascript looks like this:

```
<script type="text/javascript">
    $(function()
    {

        var DiscourseEmbed = { discourseUrl: 'https://citadel-discussion.lexmachina.com/',
                          discourseEmbedUrl: 'https://citadel-gauth.stage.lexmachina.com/cases/88' };
        var d = document.createElement('script');
        d.type = 'text/javascript';
        d.async = true;
        d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
    });
  </script>

```

---

_[View the full topic](https://meta.discourse.org/t/making-discourseembedurl-match-expected-topic-requirements/48660)._
