Rails在网站上显示iframe

时间:2016-09-13 15:58:05

标签: ruby-on-rails iframe

我有一个使用SSL的rails网站https://example.com

我想在我的网站中显示一个可以包含h​​ttp或https的iframe。

当我在application.rb文件中设置此设置时,

https://google.com似乎工作正常:

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

但是,http://google.com似乎没有显示。有谁知道我需要做些什么才能让http://google.com显示在我的iframe中?

1 个答案:

答案 0 :(得分:0)

尝试http://google.com,因为您无法使用 http

这就是为什么它使用https

SSL