cookie-session icon indicating copy to clipboard operation
cookie-session copied to clipboard

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

Open samithreddychinni opened this issue 1 year ago • 0 comments

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.

samithreddychinni avatar Oct 23 '25 08:10 samithreddychinni