Replies: 3 comments
-
|
I want to do the same thing. Have you found a solution for this? I thought about creating a plugin that adds the request and response to the context but the documentation was inconclusive for me to create it myself. |
Beta Was this translation helpful? Give feedback.
-
|
@mxfs It works for me but the typing is just not there. |
Beta Was this translation helpful? Give feedback.
-
|
Pour accéder aux cookies dans Tout d'abord, assurez-vous d'utiliser le middleware Pour ce faire, créez un fichier de déclaration declare global {
namespace Express {
interface Request {
cookies: { [key: string]: string };
}
}
}Une fois cette configuration en place, TypeScript reconnaîtra la propriété |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to get a
Express.RequestinsideaddToContextto get the cookies or ip.Beta Was this translation helpful? Give feedback.
All reactions