Skip to content

Commit deb0869

Browse files
authored
Merge pull request rails#49426 from skipkayhil/hm-rm-default-forgery-accessor
Rm unused default_protect_from_forgery accessor
2 parents b4d8603 + 3946ef2 commit deb0869

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ module RequestForgeryProtection
9090
config_accessor :per_form_csrf_tokens
9191
self.per_form_csrf_tokens = false
9292

93-
# Controls whether forgery protection is enabled by default.
94-
config_accessor :default_protect_from_forgery
95-
self.default_protect_from_forgery = false
96-
9793
# The strategy to use for storing and retrieving CSRF tokens.
9894
config_accessor :csrf_token_storage_strategy
9995
self.csrf_token_storage_strategy = SessionStore.new

actionpack/lib/action_controller/railtie.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class Railtie < Rails::Railtie # :nodoc:
7777

7878
# Configs used in other initializers
7979
filtered_options = options.except(
80+
:default_protect_from_forgery,
8081
:log_query_tags_around_actions,
8182
:permit_all_parameters,
8283
:action_on_unpermitted_parameters,

railties/test/application/configuration_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,6 @@ def create
17471747
test "config.action_controller.default_protect_from_forgery is true by default" do
17481748
app "development"
17491749

1750-
assert_equal true, ActionController::Base.default_protect_from_forgery
17511750
assert_includes ActionController::Base.__callbacks[:process_action].map(&:filter), :verify_authenticity_token
17521751
end
17531752

0 commit comments

Comments
 (0)