Discourse embedding still has some bugs?


(Hosein Naseri) #1

Continuing discussion from here, I still think my problem isn’t solved, even after updating to the newest version.

I have provided a test condition at : Page title

The embedding topic is created here appropriately: https://talk.zabanshenas.com/t/page-title/509

However I don’t see any embedded comment at my test page.

I have included the following javascript:

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

<script type="text/javascript">
  DiscourseEmbed = { discourseUrl: 'https://talk.zabanshenas.com/',
                     discourseEmbedUrl: 'https://zabanshenas.com/test/embedding/' };

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

and the host is allowed here:

the only possible issue that I can think of, is that discourse suggests to use http:// as discourseUrl, However since I want to use https, I have changed that myself. However I have tried different combination http/s but it doesn’t work with anyone.

Any Idea?


Adding an offline page when rebuilding
(Régis Hanol) #2

Something’s wrong because https://talk.zabanshenas.com/embed/comments?embed_url=https%3A%2F%2Fzabanshenas.com%2Ftest%2Fembedding%2F is returning conflicting X-Frame-Options headers

X-Frame-Options:DENY
X-Frame-Options:ALLOWALL

(Hosein Naseri) #3

Thank you very much for your help. Without it, I couldn’t have figured it out.

btw for future reference I had implemented a guide from here to add ssl to my discourse. And in that guide, it was suggested to include the following: