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
Another solution, and the one I ended up with in production, involves monkey-patching Rack::Protection::FrameOptions:
# This monkeypatch is needed to ensure the X-Frame-Options header is
# never set by rack-protection.
module Rack
module Protection
class FrameOptions < Base
def call(env)
status, headers, body = @app.call(env)
[status, headers, body]
end
end
end
end