Skip to content

Conversation

@samithreddychinni
Copy link

Adds optional encode and decode options to the middleware so callers can override how session objects are serialized into cookie values and parsed back. This enables use cases such as encryption, compression, or other custom encodings without changing the default behavior.

-Middleware now accepts encode and decode functions in options.
-Defaults remain unchanged (base64-encoded JSON).
-Tests added to demonstrate a custom encode/decode round-trip.
-README updated with a short AES-256-GCM encryption example and usage notes.
-Added test to verify custom encode/decode usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant