Skip to content

Business intelligence made simple

Moved protect_from_forgery after authentication

Andrew Kane0ca353b42751
diff --git a/app/controllers/blazer/base_controller.rb b/app/controllers/blazer/base_controller.rb
index ef4c6255..f8aa6343 100644
--- a/app/controllers/blazer/base_controller.rb
+++ b/app/controllers/blazer/base_controller.rb
@@ -8,8 +8,6 @@ module Blazer
clear_helpers
- protect_from_forgery with: :exception
-
if ENV["BLAZER_PASSWORD"]
http_basic_authenticate_with name: ENV["BLAZER_USERNAME"], password: ENV["BLAZER_PASSWORD"]
end
@@ -22,6 +20,8 @@ module Blazer
before_action Blazer.before_action.to_sym
end
+ protect_from_forgery with: :exception
+
if Blazer.override_csp
after_action do
response.headers['Content-Security-Policy'] = "default-src 'self' https: 'unsafe-inline' 'unsafe-eval' data: blob:"