Embed discourse in mobile app (glide)

Hi Guys,

This is probably a very simple setting that i’m overlooking, but currently i’m trying to embed discourse in a mobile app i’ve built in glide (glideapps.com).

However, when I try to embed it through a webview component, it says I do not have the right access.

I assume I have to whitelist the domain, but I can’t find it in the settings.


You can try whitelisting in admin >> customize >> embedding. I’m not sure what Glide is doing though, Discourse can run perfectly fine in a regular webview (for example, our own DiscourseHub app for iOS uses a webview).


Hmm. Tried that, but without success.

For the record. Could it be that is has something to do with me being on a trial account, and on your hosted solution?

Or should that not be an issue?

That should not be an issue. I just tried your site on the DiscourseHub app, and it loads correctly there. This looks like a Glide issue and I see you’ve got a ticket open there, so hopefully they’ll be able to help there.

You can also try embedding other sites, for example meta, or the Glide community (which also runs on Discourse). If none of them work, then its definitely on the Glide side (either a bug in Glide or a problem with how you are implementing this).

HI Penar,

Yes, that is exactly what I did. None of them worked in the webview. I will try to figure this out with glide.

Thanks for the feedback!

1 Like

Hi Penar,

I got some feedback from Glide on why it’s not working.

"If you put that url (https://community.pelvic.app/) into this tool it says that it has settings that prevent it from running in a iFrame. Webview is a wrapper for an iFrame. "

The first part of this is correct, by default we block loading of Discourse sites in iframes. It protects your site from a variety of risks, from SEO tricks to clickjacking (see this for more details).

The second part is odd though, webviews are definitely not iframes. Webviews are mini-browsers that can be embedded in mobile apps, they act like a real browser. An iframe is a way to load one webpage inside another webpage. I guess the whole Glide app is essentially a webpage, so they’re using iframes inside the webview there, maybe?

We have a site setting that can be toggled to allow your site to be embedded in an iframe, but we don’t recommend doing this, and there are quirks with Discourse inside an iframe. In other words, we can enable iframe embedding for you, but there might be unfixable problems down the road.


Thanks Penar. Brining this back to Glide and see if there is any easy fix.

1 Like

Hi Penar,

No need to turn this on for us right now. But to complete this topic, for anybody reading this at a later state. This is was the feedback from Glide.

We do use an iframe to power our WebView. This is the only way we can pull it off in web browsers. He’s right that a lot of sites block this for security reasons but it’s really the best we can do on the web.

The discourse community is likely assuming the WebView capability of native apps, which of course we cannot use.

For the record. Glide is a progressive web app, and not a native app.

Thanks for your help.