First of all, my apologies for bringing this topic back to the forum. I’ve read almost all the existing topics related to embedded comments not working but I don’t seem to find anything that helps in my case. I’m sure I’m missing probably a small detail, but since I’m not able to find it maybe some more eye pairs help here.
In Settings > Customize > Embedding I have added writings.mydomain.com as an allowed host, whitelist path “/.*”, no category.
In every post of my blog I’ve inserted the snippet as explained in the Embedding section, replacing dynamically the
discourseEmbedUrl by the URL of the post.
I go to my blog, click on a post and see the discourse comments iframe trying to load the discussion. After a while, the loading fails, and the client throws the following errors:
Refused to display 'https://comments.mydomain.com/embed/comments?embed_url=https%3A%2F%2Fwritings.mydomain.com%2Fmonthly-roadmap-meeting-12-09-2016.html' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. GET https://comments.mydomain.com/embed/comments?embed_url=https%3A%2F%2Fwritings.mydomain.com%2Fmonthly-roadmap-meeting-12-09-2016.html 403 ()
I tried enabling CORS in my discourse instance (env variables
DISCOURSE_ENABLE_CORS: true and
DISCOURSE_CORS_ORIGIN: '*') and rebuilding it with no success. My version of discourse is v1.7.0.beta5 +15
Anything obviously wrong you can see in my approach?
Thanks in advance.