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