Skip to content

Commit 28f81c0

Browse files
committed
Remove SameSite=None restrictions for Rack 2.1.0
Also bump Rails' now required Rack 2.1.0 version.
1 parent a0569ff commit 28f81c0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

actionpack/lib/action_dispatch/middleware/cookies.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ def handle_options(options)
440440

441441
options[:path] ||= "/"
442442
options[:same_site] ||= request.cookies_same_site_protection
443-
options[:same_site] = false if options[:same_site] == :none # TODO: Remove when rack 2.1.0 is out.
444443

445444
if options[:domain] == :all || options[:domain] == "all"
446445
# If there is a provided tld length then we use it otherwise default domain regexp.

actionpack/test/dispatch/cookies_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def test_setting_cookie_with_no_protection
366366
@request.env["action_dispatch.cookies_same_site_protection"] = :none
367367

368368
get :authenticate
369-
assert_cookie_header "user_name=david; path=/" # TODO: append "; SameSite=None" when rack 2.1.0 is out and bump rack dependency version.
369+
assert_cookie_header "user_name=david; path=/; SameSite=None"
370370
assert_equal({ "user_name" => "david" }, @response.cookies)
371371
end
372372

0 commit comments

Comments
 (0)