How do I get Sinatra to refrain from adding the X-Frame-Options header?

后端 未结 6 1817
南旧
南旧 2020-12-08 04:55

I am using Sinatra to return some IFRAME contents, and I\'d like to allow cross-domain src. Unfortunately, Sinatra is automatically adding an X-Frame-Options header to my re

6条回答
  •  北海茫月
    2020-12-08 05:18

    Neither of the options presented here worked for my sinatra app. I ended up adding an after filter to modify the X-Frame-Options header to allow the app to be framed in by Facebook.

    after do
      headers({ 'X-Frame-Options' => 'ALLOW-FROM apps.facebook.com' })
    end
    

提交回复
热议问题