Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 我有一个rails 4应用程序,其iframe不';t载荷_Ruby On Rails_Iframe - Fatal编程技术网

Ruby on rails 我有一个rails 4应用程序,其iframe不';t载荷

Ruby on rails 我有一个rails 4应用程序,其iframe不';t载荷,ruby-on-rails,iframe,Ruby On Rails,Iframe,如前所述,我有一个rails 4应用程序,它有几个来自其他站点的iFrame。我已经能够得到其中一个加载时,页面加载和可以找到。我无法加载的页面是。如果刷新页面,它将加载 工作的代码如下,我已经在没有任何运气的情况下不加载的页面上尝试了相同的代码 after_action :allow_cognito_iframe def allow_cognito_iframe response.headers['X-Frame-Options'] = 'ALLOW-FROM htt

如前所述,我有一个rails 4应用程序,它有几个来自其他站点的iFrame。我已经能够得到其中一个加载时,页面加载和可以找到。我无法加载的页面是。如果刷新页面,它将加载

工作的代码如下,我已经在没有任何运气的情况下不加载的页面上尝试了相同的代码

after_action :allow_cognito_iframe    
def allow_cognito_iframe
         response.headers['X-Frame-Options'] = 'ALLOW-FROM https://services.cognitoforms.com'
     end

这两个iFrame都在我的机器上工作,第二个需要一点时间,我以为它不会工作,但一天结束时它工作了。太酷了,我想知道为什么它们不在我的机器上工作,直到我刷新。这在多个浏览器上发生