Iframe not working in posts even with exception(s) in the back end

AI-generated summary

User W0RKSMARTER is experiencing issues with iframes not working in posts on their Discourse instance, despite adding exceptions in the backend. The iframe works in preview, but Discourse throws a 403 error when trying to save the post. supermathie points out that the allowed_iframes setting is unrelated to the 403 error and suggests that the issue might be caused by something incompatible, such as an Apache proxy. W0RKSMARTER confirms that they were using an Apache proxy and resolves the issue by giving their instance a dedicated IP, which allows the iframe to save and work as expected.

I did a search and found nothing about this but adding the iframe addresses to the backend which I have done. iframe works in preview but Discourse won’t save the post, throws a 403 error.

I don’t know what to do, this seems like a bug to me.

The allowed_iframes setting is unrelated to the 403 error; you’re getting it for a different reason.

If an iframe src is not permitted by Discourse it won’t be embedded, e.g. see below:

:down_arrow: iframe here

:up_arrow: iframe here


This oddity and the “drafts offline” warning in your computer make me wonder if you have something incompatible in the way.

For example, you’re using an Apache proxy in front of your instance - it might be rejecting the request.

Good call Sir. It was running through an Apache proxy. I gave it a dedicated IP and after DNS propagated and it came back on line, no “drafts offline” and it saved the iframe and worked as expected.

Thanks a lot for pointing me in the right direction!