0

On one of the pages in on my website, I need to have an iFrame that often displays content from http sites. I haven't found a way to display that information on my https page.

After looking around, I think the best solution might be to remove https from some of those pages. Is that possible in Meteor using Iron Router or some other tool? Or is there any way to make the iframe content display?

David Mckee
  • 1,100
  • 3
  • 19
  • 35

1 Answers1

1

Meteor does not support HTTPS by itself. The way to do it is to place a component in front of Meteor (like haproxy or nginx) that will perform the SSL offloading and send plain HTTP requests to Meteor. So the SSL connection is actually between the browser and the proxy in front, let's assume it is nginx. nginx will then forward all requests to Meteor as http.

As such, Meteor is not necessarily aware that https traffic is happening. Therefore you do not need to adjust anything inside Meteor or with Iron Router. Unfortunately there is no way to trick browsers into accepting http iFrames inside https sites, even if you were to tinker with nginx settings.

You options are to either include the external content on your server and proxy it (you could configure nginx to proxy the request to an external site and talk http to that data provider and serve https to the browser, just like you would for the Meteor server) or somehow bring the content into your Meteor app to serve it by itself.

Stephan
  • 1,279
  • 8
  • 16