Skip to content

enhancement: add encode/decode overrides and README example; relates to expressjs#169, #174#209

Open
samithreddychinni wants to merge 1 commit intoexpressjs:masterfrom
samithreddychinni:feat/encode-decode-overrides
Open

enhancement: add encode/decode overrides and README example; relates to expressjs#169, #174#209
samithreddychinni wants to merge 1 commit intoexpressjs:masterfrom
samithreddychinni:feat/encode-decode-overrides

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