The src URL of your iframe just needs to be a 'chrome-extension://' URL rather than an 'https://' URL to bypass
Gmail's content security policy. As Chris mentioned, if you'd like to host the contents of your iframe on a server rather than inside your chrome extension, you can have an iframe whose src is a 'chrome-extension://' URL but put another iframe
inside that one which points to your remotely hosted page. To answer your question re: whether https is required, we definitely recommend using https for any remote content you load into Gmail but if you nest your iframe inside one with a 'chrome-extension://' src I don't believe it is technically required (again we don't recommend using http).
On Tuesday, March 28, 2017 at 12:47:29 PM UTC-7, Ali Hassan Goraya wrote:
I am using an iframe within Modal of inboxSDK.
On Tuesday, 28 March 2017 19:04:56 UTC+5, Ali Hassan Goraya wrote:
Hello, Thanks for your reply.
What does it mean that "the url of the iframe must be within your extension" I am already using it within the extension, I am trying it within Content Script. Also is it necessary to have the URL running on HTTPS instead of HTTP?
Regards
Ali
On Tuesday, 28 March 2017 02:57:46 UTC+5, Chris Cowan wrote:
You can use iframes, but the url of the iframe must be within your extension because of the Content-Security-Policy header of Gmail and Inbox. (You can then do whatever you want within that iframe such as including an iframe pointing at a regular remote URL if you want.)
On Monday, March 27, 2017 at 1:38:24 PM UTC-7, Ali Hassan Goraya wrote:
I am building an extension for google chrome and it will work only in Gmail. I want to show a simple angular2 app inside gmail/inbox. Can I use iframe somehow?