You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to do something at request header or response header, you can use option. The usage is the same as http-proxy-middleware is.
example:
options={targets: {'/user': {// this is option of http-proxy-middlewaretarget: 'http://localhost:3001',// target hostchangeOrigin: true,// needed for virtual hosted sitesonProxyRes: (proxyRes,req,res)=>{proxyRes.headers['x-added']='foobar'// add new header to response}}}}
Is it possible use this middleware with other? yes, it is. If you want to check something,just write a middleware and put it in front of koa2-proxy-middleware...
Is it possible to use this together with middlewares?
I would like to check and modify some headers in the corresponding middleware.
The text was updated successfully, but these errors were encountered: