Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
remove X-Frame-Options header on iframe action
Browse files Browse the repository at this point in the history
  • Loading branch information
bretdavidson committed Oct 28, 2016
1 parent 1b18cb1 commit 7545031
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/lentil/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ module Lentil
class ApplicationController < ActionController::Base
# FIXME: I don't know why the engine isn't using its own application layout like it is supposed to.
layout "lentil/application"

private
def allow_iframe
response.headers.delete "X-Frame-Options"
end
end
end
end
1 change: 1 addition & 0 deletions app/controllers/lentil/images_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Lentil
class ImagesController < Lentil::ApplicationController
include ActionView::Helpers::TextHelper
after_filter :allow_iframe, only: [:iframe]

def index
respond_to do |format|
Expand Down

0 comments on commit 7545031

Please sign in to comment.