Skip to content

Commit 331681e

Browse files
committed
hotfix: /admin in prod. oops. sorry
1 parent 2c1c0d2 commit 331681e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def configure_permitted_parameters
1919
end
2020

2121
def authenticate_admin!
22+
response.headers['Cache-Control'] = 'no-store'
2223
redirect_to root_path unless current_user&.admin
2324
end
2425

config/initializers/active_admin.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
# will call the method to return the path.
9999
#
100100
# Default:
101+
config.base_controller = 'ApplicationController'
101102
config.logout_link_path = :destroy_user_session_path
102103
config.logout_link_method = :delete
103104
config.authentication_method = :authenticate_admin!
@@ -149,6 +150,7 @@
149150
# Active Admin resources and pages from here.
150151
#
151152
# config.before_action :do_something_awesome
153+
config.before_action { response.headers['Cache-Control'] = 'no-store' }
152154

153155
# == Localize Date/Time Format
154156
#

0 commit comments

Comments
 (0)