For reference, this is the before code: https://github.com/rails/rails/blob/fafe8ece9d406cfbb197cc424baaa15a5772fae5/actionpack/lib/action_dispatch/middleware/cookies.rb#L387-L397