Trouble with embedding

I’ve ran into an issue while setting up Discourse as a comment system for our blog.

We’ve set up a proper whitelist:

And we’re using this embed code:

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

<script type="text/javascript">
  DiscourseEmbed = { discourseUrl: '',
                     discourseEmbedUrl: '' };

  (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);

However, the comments don’t show up. The behavior is different in Firefox:

Than in Chrome:

Discourse runs on the same machine in Docker behind a reverse proxy (nginx).

How can we approach debugging this?