Skip to content

Commit 6f8aa2b

Browse files
committed
Move the least common check to the end of the conditional
1 parent 9d6f768 commit 6f8aa2b

File tree

1 file changed

+1
-1
lines changed
  • actionpack/lib/action_dispatch/middleware

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/middleware/cookies.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def make_set_cookie_header(header)
439439
end
440440

441441
def write_cookie?(cookie)
442-
request.ssl? || request.host.end_with?(".onion") || !cookie[:secure] || always_write_cookie
442+
request.ssl? || !cookie[:secure] || always_write_cookie || request.host.end_with?(".onion")
443443
end
444444

445445
def handle_options(options)

0 commit comments

Comments
 (0)