mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 23:49:34 +08:00
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:
@ -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
|
Reference in New Issue
Block a user