0

I am trying to embed this link using an iFrame: https:\bobcat-den-delivery.herokuapp.com The iFrame is clearly there, but definitely blank.

This is my frame code:

<iframe src="https://bobcat-den-delivery.herokuapp.com/" style="border:2px #2980b9 none;" scrolling="yes" frameborder="1" marginheight="1px" marginwidth="1px" height="300px" width="700px"></iframe>

This seems really simple and I am having trouble figuring out exactly what is going wrong.

Matt Perejda
  • 509
  • 5
  • 14

2 Answers2

0

I tried it with a normal iframe and it didn't work. The website could be blocking iframe's through .htaccess. If it's your website then look at the .htaccess.

Blocking in .htaccess

Header set X-Frame-Options DENY

But, you can enable iframes come from the same origin.

Header always append X-Frame-Options SAMEORIGIN 
Idris
  • 997
  • 2
  • 10
  • 27
0

The problem was the iFrame permissions of the site to be embedded. Adding this code to the application.rb file solved the issue:

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

}

Source: Ruby on rails 4 app does not work in iframe

Community
  • 1
  • 1
Matt Perejda
  • 509
  • 5
  • 14