Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward ClientRecord from middleware in express #1645

Open
forgetso opened this issue Jan 29, 2025 · 1 comment
Open

Forward ClientRecord from middleware in express #1645

forgetso opened this issue Jan 29, 2025 · 1 comment
Labels
dev Product development size-s

Comments

@forgetso
Copy link
Member

forgetso commented Jan 29, 2025

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 forgetso added the dev Product development label Jan 29, 2025
@forgetso
Copy link
Member Author

forgetso commented Feb 4, 2025

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

@forgetso forgetso added the size-s label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Product development size-s
Projects
None yet
Development

No branches or pull requests

1 participant