Modify headers to allow embed (#3935)

This commit is contained in:
Ben Halpern 2019-09-03 16:38:04 -04:00 committed by GitHub
parent 81f7f73575
commit 07ba4d8b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,15 @@
class LiquidEmbedsController < ApplicationController
before_action :set_cache_control_headers, only: %i[show]
after_action :allow_iframe, only: :show
layout false
def show
set_surrogate_key_header params.to_s
end
private
def allow_iframe
response.headers.except! "X-Frame-Options"
end
end