0

I have a rails site that uses SSL so https://example.com

I want to display an iframe within my site that can contain either http or https.

https://google.com seems to work fine when I have this set in my application.rb file:

config.action_dispatch.default_headers = {
  'X-Frame-Options' => 'ALLOWALL'
}

However, http://google.com does not seem to display. Does anyone know what I need to do to get a http://google.com to display in my iframe?

Tom Hammond
  • 5,842
  • 12
  • 52
  • 95

1 Answers1

0

Try http://google.com it will redirect to https://google.com as it is SSL certified due to that you can not open it with http

that's why it is working with https

<iframe src="https://www.google.com/ ">
    <p>Placeholder text</p>
</iframe>
Arvind
  • 2,671
  • 1
  • 18
  • 32
  • I think the answer might actually lie here - http://stackoverflow.com/questions/18327314/how-to-allow-http-content-within-an-iframe-on-a-https-site. I'm not actually doing `google.com` :). It's a site that doesn't have SSL. – Tom Hammond Sep 13 '16 at 16:21