cookie-session
cookie-session copied to clipboard
enhancement: add encode/decode overrides and README example; relates to expressjs#169, #174
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.