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

Commit 7545031

Browse files
committed
remove X-Frame-Options header on iframe action
1 parent 1b18cb1 commit 7545031

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/controllers/lentil/application_controller.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@ module Lentil
22
class ApplicationController < ActionController::Base
33
# FIXME: I don't know why the engine isn't using its own application layout like it is supposed to.
44
layout "lentil/application"
5+
6+
private
7+
def allow_iframe
8+
response.headers.delete "X-Frame-Options"
9+
end
510
end
6-
end
11+
end

app/controllers/lentil/images_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module Lentil
22
class ImagesController < Lentil::ApplicationController
33
include ActionView::Helpers::TextHelper
4+
after_filter :allow_iframe, only: [:iframe]
45

56
def index
67
respond_to do |format|

0 commit comments

Comments
 (0)