Answer the question
In order to leave comments, you need to log in
How to make res.locals different for each client?
When authorizing, I do this res.locals.data = req.user.data;
. But when another user logs in, then the data of the new user is in res.locals.data, and all users see this data instead of their own
. How can I fix this?
Answer the question
In order to leave comments, you need to log in
It can not be. res.locals and locals, which lives only within a single request - moreover, res and req live only until the response leaves the client. Do you have some kind of global variable?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question