How do I read session data outside of the asynclocalstorage context?
Is there some function I can pass a request into and get the session data out? I need to get an API token from the session to use in a proxy middleware in my express server running the whole app.
3 Replies
correct-apricot•7d ago
where do you want to read it?
provincial-silverOP•7d ago
I have an express server running start, I need to read it in a separate middleware
The whole reason I’m even running the express server is only because I need to proxy all requests to /api/* to a separate api server.
So if there is a cleaner way to achieve that then that works too
correct-apricot•7d ago
the proxying should be doable via a request Middleware in start itself
you can also run express inside start