From 6f8aa2b17d73fb2a6d2a1165cba73423bf205ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 26 Nov 2021 20:43:40 +0000 Subject: [PATCH] Move the least common check to the end of the conditional --- actionpack/lib/action_dispatch/middleware/cookies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 0852725765..dba9d935d5 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -439,7 +439,7 @@ module ActionDispatch end def write_cookie?(cookie) - request.ssl? || request.host.end_with?(".onion") || !cookie[:secure] || always_write_cookie + request.ssl? || !cookie[:secure] || always_write_cookie || request.host.end_with?(".onion") end def handle_options(options)