-
Notifications
You must be signed in to change notification settings - Fork 868
Description
This a question
I try to build a proxy using express, and I want it to be transparent except for jwt access tokens. Basically, I want to manage the authentication at proxy level. Specifically, it is about Strapi that provides an access token valid for one month without the possibility of adjustment, and I want to store that token and issue tokens with lower validity to be managed at the proxy level.
I analyzed several middlewares to find the one that can intercept the Strapi token and gives the possibility to modify the sent answer. I could only find middleware that intercepts the token sent by the client.
My question is: can this middleware intercept and modify the response sent by the proxied server? If so, what function do I need? Can anyone show me an example?