about summary refs log tree commit diff
path: root/config/initializers/suppress_csrf_warnings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/suppress_csrf_warnings.rb')
-rw-r--r--config/initializers/suppress_csrf_warnings.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/initializers/suppress_csrf_warnings.rb b/config/initializers/suppress_csrf_warnings.rb
index 410ab585b..b86adc6f1 100644
--- a/config/initializers/suppress_csrf_warnings.rb
+++ b/config/initializers/suppress_csrf_warnings.rb
@@ -1,3 +1,5 @@
 # frozen_string_literal: true
 
-ActionController::Base.log_warning_on_csrf_failure = false
+Rails.application.reloader.to_prepare do
+  ActionController::Base.log_warning_on_csrf_failure = false
+end