Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Set action_controller.forgery_protection_origin_check = true

Christophe Bliard1479e153048f
diff --git a/config/initializers/new_framework_defaults_5_0.rb b/config/initializers/new_framework_defaults_5_0.rb
index 4afce5ea4ab..aaae8c6802b 100644
--- a/config/initializers/new_framework_defaults_5_0.rb
+++ b/config/initializers/new_framework_defaults_5_0.rb
@@ -17,7 +17,7 @@ Rails.application.config.action_controller.per_form_csrf_tokens = true
# https://guides.rubyonrails.org/configuring.html#config-action-controller-forgery-protection-origin-check
# Enable origin-checking CSRF mitigation. Previous versions had false. Rails
# 5.0+ default is true.
-# Rails.application.config.action_controller.forgery_protection_origin_check = true
+Rails.application.config.action_controller.forgery_protection_origin_check = true
# https://guides.rubyonrails.org/configuring.html#activesupport-to-time-preserves-timezone
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.