Embedding error - The referer was either not sent, or did not match any of the following hosts

Hello all, I’m trying to use https://forum.neverlocal.com as the comments section of https://blog.neverlocal.com which is our company jekyll blog. We are using the hosted version of Discourse.

Discourse embedding is configured as follows:

Allowed hosts: blog.neverlocal.com
Path allowlist: */
Post to category: Blog
Post author: system

Embedding code is:

  <div id='discourse-comments' style="display: none"></div>
  <meta name='discourse-username' content='system'>
  
  <script type="text/javascript">
    DiscourseEmbed = {
      discourseUrl: 'https://forum.neverlocal.com/',
      discourseEmbedUrl: '{{site.url}}{{page.url}}',
      // className: 'share-box',
    };
  
    (function() {
      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>

Atm we’re not displaying the iframe for debugging reasons, which is why it’s styled as display: none.

Unfortunately I hit the following error:

Referer:https://blog.neverlocal.com/xxx

The referer was either not sent, or did not match any of the following hosts:

    blog.neverlocal.com.*

Also, no posts are created on our forum.

BTW, you can check all this yourself by going on the blog, open any post, and inspecting the situation with developer tools. I’m a bit at a loss and I don’t know what to do, I’ve scouted the forum but no solution seems to work.

Any help would be greatly appreciated!
Fab

Ok, I’ve made some progress. Basically I didn’t change anything aside from the fact that we confirmed our subscription (we were at the end of the trial period before). Could it be that embedding doesn’t work unless the subscription is active?

Aside from this, I have still a problem, namely that the comment section iframe is stuck at 150px and doesn’t want to dynamically update in any way. This means that the comment section gets cut and the ‘continue discussion’ button is not visible. I’ve searched everywhere in the forum but I can’t seem to find anything pointing me to a fix.

Regarding this, the answer is no. There are no limitations related to embedding on our trial sites.

To my knowledge, we have never encountered such an issue. For example, see the replies in this blog, Building a PC, Part IX: Downsizing

Then it’s really weird! I almost went mad trying to understand what I was doing wrong 15 days ago. Then I check today and I find out that 7 days ago all the topics were automatically created, and i-frames were embedding. The blog didn’t have any change pushed in this period of time.

To my knowledge, we have never encountered such an issue. For example, see the replies in this blog, Building a PC, Part IX: Downsizing

Yes, this is exactly how we’d like it. In our case instead the i-frame height is capped at 150px. May it have something to do with how we style the i-frame itself and the div that contains it?

I think so, it must be a custom CSS rule for iframes or perhaps one inherited from some other custom CSS.