previously, the proxy response would overwrite same-named headers without the possibility to fix it in userResHeaderDecorator. This is problematic e.g. for applications that use set-cookie for auth cookies set in a middleware before the proxy middleware, and where the proxy response overwrites this header.
this change is backwards-compatible and keeps overwriting headers, but when using userResHeaderDecorator, the original headers can be read from userRes and returned to the caller.
fixes https://github.com/villadora/express-http-proxy/issues/547
previously, the proxy response would overwrite same-named headers without the possibility to fix it in
userResHeaderDecorator
. This is problematic e.g. for applications that useset-cookie
for auth cookies set in a middleware before the proxy middleware, and where the proxy response overwrites this header.this change is backwards-compatible and keeps overwriting headers, but when using
userResHeaderDecorator
, the original headers can be read fromuserRes
and returned to the caller.