Support :message_pack as cookies serializer#48103
Merged
jonathanhefner merged 1 commit intorails:mainfrom May 8, 2023
Merged
Conversation
c42ada0 to
ffdfd27
Compare
This commit adds support for `:message_pack` and `:message_pack_allow_marshal` as serializers for `config.action_dispatch.cookies_serializer`, just like `config.active_support.message_serializer`. The `:message_pack` serializer can fall back to deserializing with `AS::JSON`, and the `:message_pack_allow_marshal` serializer can fall back to deserializing with `AS::JSON` or `Marshal`. Additionally, the `:marshal`, `:json`, and `:hybrid` / `:json_allow_marshal` serializers can now fall back to deserializing with `AS::MessagePack`. These behaviors make it easier to migrate between cookies serializers.
ffdfd27 to
c924ba0
Compare
jonathanhefner
added a commit
to jonathanhefner/rails
that referenced
this pull request
Sep 10, 2023
This covers rails#47770, rails#47964, rails#48103, and rails#48104, plus the follow-up changes to `ActiveSupport::Cache::Store` options from rails#48449 and rails#48451.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds support for
:message_packand:message_pack_allow_marshalas serializers forconfig.action_dispatch.cookies_serializer, just likeconfig.active_support.message_serializer.The
:message_packserializer can fall back to deserializing withAS::JSON, and the:message_pack_allow_marshalserializer can fall back to deserializing withAS::JSONorMarshal. Additionally, the:marshal,:json, and:hybrid/:json_allow_marshalserializers can now fall back to deserializing withAS::MessagePack. These behaviors make it easier to migrate between cookies serializers.