From 8514ef723c3e3963567a9d57bd0d71a5091fc802 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 10 Jun 2019 12:28:13 +0200 Subject: [PATCH] Fix login sometimes redirecting to paths that are not pages (#11019) Fix #11016 --- app/controllers/custom_css_controller.rb | 2 ++ app/controllers/manifests_controller.rb | 2 ++ app/controllers/media_controller.rb | 2 ++ app/controllers/media_proxy_controller.rb | 2 ++ 4 files changed, 8 insertions(+) diff --git a/app/controllers/custom_css_controller.rb b/app/controllers/custom_css_controller.rb index be768c089..6e80feaf8 100644 --- a/app/controllers/custom_css_controller.rb +++ b/app/controllers/custom_css_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class CustomCssController < ApplicationController + skip_before_action :store_current_location + before_action :set_cache_headers def show diff --git a/app/controllers/manifests_controller.rb b/app/controllers/manifests_controller.rb index ac267c229..332d845d8 100644 --- a/app/controllers/manifests_controller.rb +++ b/app/controllers/manifests_controller.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class ManifestsController < ApplicationController + skip_before_action :store_current_location + def show render json: InstancePresenter.new, serializer: ManifestSerializer end diff --git a/app/controllers/media_controller.rb b/app/controllers/media_controller.rb index 8e1624ce1..a245db2d1 100644 --- a/app/controllers/media_controller.rb +++ b/app/controllers/media_controller.rb @@ -3,6 +3,8 @@ class MediaController < ApplicationController include Authorization + skip_before_action :store_current_location + before_action :set_media_attachment before_action :verify_permitted_status! diff --git a/app/controllers/media_proxy_controller.rb b/app/controllers/media_proxy_controller.rb index d820b257e..950cf6d09 100644 --- a/app/controllers/media_proxy_controller.rb +++ b/app/controllers/media_proxy_controller.rb @@ -3,6 +3,8 @@ class MediaProxyController < ApplicationController include RoutingHelper + skip_before_action :store_current_location + def show RedisLock.acquire(lock_options) do |lock| if lock.acquired?