From 5b1da215296b5316568ad7c8449652f0d7f74ebe Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Thu, 12 Jun 2014 17:08:01 +0200 Subject: [PATCH] Allow iframes for all of PromDash. We want to be able to show any PromDash content in iframes, so this removes the X-Frame-Options for all views. --- app/controllers/application_controller.rb | 1 + app/controllers/embed_controller.rb | 1 - app/controllers/single_widget_controller.rb | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3e292504..e9de343a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -3,6 +3,7 @@ class ApplicationController < ActionController::Base # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception + after_action :allow_iframe after_filter :set_csrf_cookie_for_ng def set_csrf_cookie_for_ng diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 4c1e9930..69378704 100644 --- a/app/controllers/embed_controller.rb +++ b/app/controllers/embed_controller.rb @@ -1,5 +1,4 @@ class EmbedController < ApplicationController - after_action :allow_iframe, only: :show before_action :set_dashboard_via_slug, only: :show def show diff --git a/app/controllers/single_widget_controller.rb b/app/controllers/single_widget_controller.rb index 62e54826..1d6f40d0 100644 --- a/app/controllers/single_widget_controller.rb +++ b/app/controllers/single_widget_controller.rb @@ -1,8 +1,6 @@ require 'slug_maker' class SingleWidgetController < ApplicationController - after_action :allow_iframe, only: :show - def show shortened_url = ShortenedUrl.find(params[:slug]) shortened_url.update_last_accessed