تضمين تعليقات Discourse في موقع مستضاف على readthedocs

مرحبًا بالجميع،

لقد كنت أحاول إضافة تعليقات Discourse من منتدانا إلى موقع التوثيق الخاص بنا.
نستضيف توثيقنا على ReadTheDocs.

استخدمت كود JavaScript من Discourse المخصص للتضمين، لكنه كان يعرض فقط “جاري تحميل النقاش”.

الروابط:
المنتدى
رابط تضمين Discourse(موقع ReadTheDocs)

فحصت الصفحة ووجدت في وحدة التحكم رسالة خطأ:

Invalid X-Frame-Options: “ALLOWALL” header from “[https://forum.zenko.io/embed/comments?embed_url=https%3A%2F%…tsInReadTheDocs%2Freference%2Fobject_operations%2Findex.html](https://forum.zenko.io/embed/comments?embed_url=https%3A%2F%2Fzenko.readthedocs.io%2Fen%2Fdocumentation%2FZENKOIO-111-ForumCommentsInReadTheDocs%2Freference%2Fobject_operations%2Findex.html)” loaded into “[https://zenko.readthedocs.io/en/documentation-zenkoio-111-fo…commentsinreadthedocs/reference/object_operations/index.html](https://zenko.readthedocs.io/en/documentation-zenkoio-111-forumcommentsinreadthedocs/reference/object_operations/index.html)”.

وإذا كان هذا مفيدًا:

عنوان الطلب: https://forum.zenko.io/embed/comments?embed_url=https%3A%2F%2Fzenko.readthedocs.io%2Fen%2Fdocumentation%2FZENKOIO-111-ForumCommentsInReadTheDocs%2Findex.html
طريقة الطلب: GET
العنوان البعيد: 72.52.80.11:443
رمز الحالة:
400
الإصدار: HTTP/2.0

هل واجه أي شخص مشكلة مشابهة أو يمكنه المساعدة؟

شكرًا جزيلًا! :blush:

5 إعجابات

Hello Dasha,

I just checked your site in the comment, and as I see you could solve the problem. Can you help me with a short description of how you did it, it seems I have the same problem, and it could be helpful for others too.

Thanks!

3 إعجابات

Hello @Tokapeb
It’s hard to say what exactly resolved my issue, but as far as I remember I did two things to fix it:

  • added my site’s URL to cors origins on the forum site settings
  • changed discourse embed URI in the script to canonical (it wasn’t before)

Hope it helps :slight_smile:

إعجابَين (2)