لقد تابعت هذا الموضوع Iframe question - #3 ولكني أعتقد أنني وسعت الموضوع الأصلي إلى حد ما.
هذه المشاركة Iframe question - #3 - تقوم بتحميل عنوان URL بنجاح مع وصف لمقالة مدونتي. الصندوق أدناه، مع ذلك، وهو iframe، لا يحاول حتى التحميل، وفقًا لفحصي لعلامة تبويب الشبكة (F12) عند عرض المشاركة في Discourse. لا يوجد طلب واحد نحو miniglot.com (next.js مستضاف على Vercel مع Cloudflare لنظام أسماء النطاقات)، فقط forum.miniglot.com (خادم Discourse، مستضاف بشكل منفصل).
علامة المشاركة:
https://miniglot.com/blog/welcome-to-the-miniglot-community
<iframe url="https://miniglot.com/blog/welcome-to-the-miniglot-community"></iframe>
إعداد Discourse CORS origin:
- https miniglot.com
- https www.miniglot.com
إعداد Discourse “iframes المسموح بها”:
- miniglot.com
- https www.miniglot.com
- https miniglot.com
- https miniglot.com/blog/welcome-to-the-miniglot-community
- https www.miniglot.com/blog/welcome-to-the-miniglot-community
ملف next.config.js الخاص بي على miniglot.com:
… على الرغم من أنني لا أعتقد أنه في النطاق لأنني لا أرى الخادم يُستدعى أبدًا:
...
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'ALLOWALL',
},
{
key: 'Content-Security-Policy',
value: "frame-ancestors 'self' https://forum.miniglot.com;",
},
],
},
]
},
...
أي اقتراحات أيها الزملاء؟ قد أستسلم من iframes في الوقت الحالي، وهو أمر مؤسف لأنني أعتقد أنه سيساعد المبتدئين على فهم ما تدور حوله فئة “تعليقات المدونة” على Discourse الخاص بي، وكيفية ربطها بصفحات المدونة.
