Ruby- iframe 顯示問題!?

匿 匿名 582 次瀏覽 0 個回答

我是用rails 5.0.2版

想用youtube 上的分享

分享會用到IFRAME 但是在SHOW的時候iFream沒有辦法顯示


GOOGLE上找到的解答是從
config/application.rb中加入
config.action_dispatch.default_headers.merge!({'X-Frame-Options' => 'ALLOWALL'})

也有試過從controller中加入
response.headers.except! 'X-Frame-Options'
response.headers['X-Frame-Options'] = 'ALLOW-FROM https://www.youtube.com'

但是都不成功????

有其他解法嗎?

我是在production 模式下


--

我要回答

0 個回答

還沒有人回答,你知道答案嗎?

我要回答

登入會員後即可回答問題。

免費註冊