fastify / fastify-secure-session

Create a secure stateless cookie session for Fastify
MIT License
201 stars 45 forks source link

fix: monitor objects and delete property #218

Closed Nanosync closed 4 months ago

Nanosync commented 5 months ago

Fixes #217

This PR ensures changed in Session is set to true by:

Checklist

mcollina commented 5 months ago

I still don't understand why it needs to be in module scope vs inside the plugin scope.

Nanosync commented 5 months ago

@mcollina Do you mean that sessionProxyCache should be moved into the scope of fastifySecureSession? I was not aware that fastifySecureSession would be called multiple times.

Edit: I've moved its scope.

mcollina commented 4 months ago

I'm not sure why but the tests are now failing, I'm reverting.

https://github.com/fastify/fastify-secure-session/actions/runs/8631175011/job/23659036483#step:5:117

Feel free to open a fresh PR with this, but these kind of failures are why I generically prefer to avoid Proxy.