Embedded Links of my Discourse not showing up when links shared on discord
can anyone point me in the right path?
The user hhf.technology is experiencing issues with embedded links from their Discourse forum not displaying previews when shared on Discord. Moin suggests checking the forum’s onebox configuration and using iFramely to test meta tags, noting that the request might be blocked by the forum’s settings. hhf.technology investigates and identifies a missing Content Security Policy (CSP) configuration, adding rules like frame-ancestors, frame-src, embed-src, and child-src to allow embedding. Despite these changes, previews still don’t work. merefield suspects that Cloudflare’s WAF might be blocking access to the onebox generation process, suggesting that Discourse and Discord user agents should be permitted. hhf.technology confirms the Cloudflare setup and explores further, with merefield recommending checking Cloudflare’s Discourse community for standard rules. hhf.technology shares their progress and eventually resolves the issue, thanking both Moin and merefield for their help. merefield requests that hhf.technology share the solution with the community for others’ benefit.
thanks @Moin. let me check my csp policy
this CSP configuration was missing to allow embedding
frame-ancestors 'self' https: * - Allows your content to be embedded in iframes on any HTTPS siteframe-src 'self' https: * - Allows your site to embed content from any HTTPS sourceembed-src 'self' https: * - Allows embedded content from any HTTPS sourcechild-src 'self' https: * - Fallback for frame-src in older browsersIf this is correct
test
still not working
Looks like you have some check running which is blocking system/bot access?
That’s probably blocking access to the code that’s preparing the onebox.
CF Waf would that be the cause?
Maybe you can permit Discourse and Discord user agents amongst other popular options?
Looks like your rules are working ! ![]()
You will need to open them up for this to work I believe.
There are probably well trodden standard rules people use for Discourse instances and Discord to permit their previews.
There’s a Cloudfare Discourse. Perhaps ask there?
this is nothing to do with your Discourse instance’s settings.
you are blocking other systems seeing your content with your CF setup.
thanks for your input. will get back if i can solve it. I had your plugin but sadly couldn’t utilize it.
Oh let me know on the plugin topic if you have any issues that I can help with ![]()
sure. once i solve this issue i will take a shot at you your plugin. it looks cool. thanks, by the way
@Moin thank you buddy.
See you guys around
one request: if you do get a good answer from the CF community, perhaps you could link it here?
Sure i will. Some can benefit from
Hurray!!! @merefield @Moin