REFACTOR: do X-Frame-Options header removal in application controller.

Co-authored-by: Sam <sam.saffron@gmail.com>
Previous commit: f7084a4339e2667f644cffcfea61cc3c69521bec
This commit is contained in:
Vinoth Kannan
2019-12-06 18:25:32 +05:30
parent c88797bf0e
commit e51091f199
3 changed files with 7 additions and 20 deletions

View File

@ -1,15 +0,0 @@
# frozen_string_literal: true
module Middleware
class FrameOptions
def initialize(app, settings = {})
@app = app
end
def call(env)
status, headers, body = @app.call(env)
headers.except!('X-Frame-Options') if SiteSetting.allow_embedding_site_in_an_iframe
[status, headers, body]
end
end
end