captcha icon indicating copy to clipboard operation
captcha copied to clipboard

Forward ClientRecord from middleware in express

Open forgetso opened this issue 11 months ago • 1 comments

Client record is retrieved in domainMiddleware.

Express Request object should be extended to have req.clientRecord as a key so that we don't need to query for clientRecord multiple times.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/d757e7089fe724d90d85813c1a2ea2e437a13604/types/express-serve-static-core/index.d.ts#L6-L13

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/method-override/index.d.ts

https://expressjs.com/en/guide/writing-middleware.html

https://stackoverflow.com/a/47448486

forgetso avatar Jan 29 '25 11:01 forgetso

  • [ ] Do we use a cache object and pass a state around
  • [ ] Modify the express request first

forgetso avatar Feb 04 '25 10:02 forgetso