# Embedding an AppEngine-hosted web app via IFRAME

**URL:** https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280
**Category:** Support
**Created:** [May 11, 2018, 4:54pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280 "2018-05-11T16:54:48Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Emmanuel\_Schanzer](https://avatars.discourse-cdn.com/v4/letter/e/87869e/32.png) [@Emmanuel\_Schanzer](https://meta.discourse.org/u/Emmanuel_Schanzer)
#### Post date: [May 11, 2018, 4:54pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/1 "2018-05-11T16:54:48Z")

</div>

Hi all - I’m new to Discourse, and just figuring things out. We run a large computer science education nonprofit, and are looking to move our online teacher discussions from Google Groups to Discourse.

I’ve successfully embedded other cloud-based tools into topics already, by:

1. Whitelisting their domains
2. Making a new topic
3. Using `<iframe src="<whitelisted domain>"></iframe>` in the body of the topic

However, I’ve been unable to embed our own cloud-based IDE. The IFRAME shows up blank. A quick trip to the developer tools shows that the http request went out, but was denied with error 307 - Internal Redirect (see attached screenshot). My theory is that this is happening because our domain points to an [AppEngine instance](http://261-dot-wescheme-hrd-2.appspot.com/), so a redirect is happening behind the scenes and Discourse is blocking it for security reasons. Evidence to support this theory: embedding the AppEngine instance itself works, but using the domain doesn’t.

Since we periodically update the instance, it’s very important that the normal URL works. I’ve searched through other topics on the forum to no avail. Anyone got any advice for a n00b?

Thanks in advance!

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/5/356b64b00f6345a09e3bcf2087fd2f34383ba3b1.png)

---

<div class="post-metadata">

### Author: ![Hossein\_Amerkashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hossein_amerkashi/32/89092_2.png) [@Hossein\_Amerkashi](https://meta.discourse.org/u/Hossein_Amerkashi)
#### Post date: [May 11, 2018, 9:07pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/2 "2018-05-11T21:07:34Z")

</div>

@Emmanuel_Schanzer

1. why are you using the version number? You can simply use your application id which will, by default point to active version
2. What type of ago are you hosting in app engine? Are you just trying to have your discourse to have a link to your app engine app? If so, check my forum at [community.AppyBuilder.com](http://community.AppyBuilder.com). make sure you are viewing in desktop mode. If in desktop mode, you’ll see a puzzle block Icon at top right. Clicking on it will open our app engine app. Check and see if that’s what you are looking for

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [May 12, 2018, 12:18am UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/3 "2018-05-12T00:18:05Z")

</div>

This doesn’t look like a Discourse problem. If you fix the URL you’re embedding to not cause a 307, everything will probably work a lot better. Interestingly, the “307 Internal Redirect” is reportedly issued when Chrome is asked to load a HTTP resource for a domain for which it has an HSTS policy active. However, in your case the headers suggest that it’s already a HTTPS URL, so presumably there’s also other cases where Chrome does the same thing. Either way, though, this isn’t a problem with Discourse, it’s a browser/embedded site problem.

---

<div class="post-metadata">

### Author: ![Emmanuel\_Schanzer](https://avatars.discourse-cdn.com/v4/letter/e/87869e/32.png) [@Emmanuel\_Schanzer](https://meta.discourse.org/u/Emmanuel_Schanzer)
#### Post date: [May 12, 2018, 1:50am UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/4 "2018-05-12T01:50:18Z")

</div>

1. No, I’m not using the version number. As I wrote: I am using the appID, and embedding [www.wescheme.org](http://www.wescheme.org). The fact that the version number _works_ and the appID _doesn’t_ suggests the problem is with the AppEngine redirect.
2. No, I’m not trying to link. As I wrote: I am trying to embed my AppEngine app inside a Discourse post, using iframe.

---

<div class="post-metadata">

### Author: ![Emmanuel\_Schanzer](https://avatars.discourse-cdn.com/v4/letter/e/87869e/32.png) [@Emmanuel\_Schanzer](https://meta.discourse.org/u/Emmanuel_Schanzer)
#### Post date: [May 12, 2018, 1:53am UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/5 "2018-05-12T01:53:18Z")

</div>

I agree that the URL is problematic, but the problem only happens with discourse. [The URL by itself](https://www.wescheme.org) works perfectly in a browser tab, and I’ve been able to embed it using IFRAMEs elsewhere. If it works everywhere else, something tells me there’s a discourse-specific interaction effect happening.

I could use a little help in tracking down the issue. Surely _some_ discourse user has tried to embed an AppEngine app at some point, no?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [May 12, 2018, 6:36am UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/6 "2018-05-12T06:36:43Z")

</div>

That link is different to the one in the screenshot you provided earlier. Perhaps that’s related to the problem?

---

<div class="post-metadata">

### Author: ![Emmanuel\_Schanzer](https://avatars.discourse-cdn.com/v4/letter/e/87869e/32.png) [@Emmanuel\_Schanzer](https://meta.discourse.org/u/Emmanuel_Schanzer)
#### Post date: [May 12, 2018, 10:43am UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/7 "2018-05-12T10:43:17Z")

</div>

Good catch! However, it’s the same domain - with the same result.

---

<div class="post-metadata">

### Author: ![Emmanuel\_Schanzer](https://avatars.discourse-cdn.com/v4/letter/e/87869e/32.png) [@Emmanuel\_Schanzer](https://meta.discourse.org/u/Emmanuel_Schanzer)
#### Post date: [June 4, 2018, 6:51pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/8 "2018-06-04T18:51:38Z")

</div>

Problem solved! It turns out that some of the resources being loaded by the IFRAME were being loaded via HTTP. The `no-referrer-when-downgrade` error was the hint that something fishy was going on.

Now we can embed our IDE inside Discourse posts - which will be a HUGE boon to teachers who have questions about the programming activities in the curriculum. Thanks so much to everyone who chimed in to help! I’ve attached a screenshot of a working demo.

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/a/5abdba6b63232bcce27697189a97ac33fc7c5081.jpg)

---

<div class="post-metadata">

### Author: ![ebizzinfotech](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ebizzinfotech/32/140562_2.png) [@ebizzinfotech](https://meta.discourse.org/u/ebizzinfotech)
#### Post date: [May 9, 2019, 12:54pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/9 "2019-05-09T12:54:02Z")

</div>

Is this still useful in 2019? Or an updated version is there please help this newbie. I have started [laravel development services](https://www.ebizzinfotech.com/laravel-development-company/) try to reach out.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [May 9, 2019, 1:25pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/10 "2019-05-09T13:25:36Z")

</div>

This should still work. Have you encountered any problems while attempting to do so?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 8, 2019, 1:34pm UTC](https://meta.discourse.org/t/embedding-an-appengine-hosted-web-app-via-iframe/87280/11 "2019-06-08T13:34:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
