I did follow up on this topic Iframe question - #3 by Jerome but I think I stretched the original subject somewhat.
This post Iframe question - #3 by Jerome - successfully loads a URL with a description to my blog article. The box below however, an iframe, does not attempt to even load, as per my inspection of the Network tab (F12) when viewing the post in Discourse. Not a single request towards miniglot.com (next.js hosted at Vercel with Cloudflare for DNS), only forum.miniglot.com (the Discourse server, hosted separately).
Post markup:
https://miniglot.com/blog/welcome-to-the-miniglot-community
<iframe url="https://miniglot.com/blog/welcome-to-the-miniglot-community"></iframe>
Discourse setting CORS origin:
- https miniglot.com
- https www.miniglot.com
Discourse setting “allowed iframes”:
- miniglot.com
- https www.miniglot.com
- https miniglot.com
- https Welcome to the miniglot community | miniglot
- https Welcome to the miniglot community | miniglot
My next.config.js on miniglot.com:
… though I don’t think it’s even in scope as I don’t see the server being even ever called:
...
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'ALLOWALL',
},
{
key: 'Content-Security-Policy',
value: "frame-ancestors 'self' https://forum.miniglot.com;",
},
],
},
]
},
...
Any pointers peeps ? I might give up iframes for now, which is a shame as I think it’d help novices understand what the “blog comments” category is about on my Discourse, and how it wires up to the blog pages.