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
Does the responseInterceptor only intercept certain types of request responses, that can then be modified if required?
I'm using http-proxy-middleware to proxy an entire website, including all assets; images, CSS, JS. I can tell that the CSS for example, is being proxied successfully by logging request URLs in my router; however, in my response handler:
on: {
proxyRes: responseInterceptor(async (responseBuffer, proxyRes, req, res) => {
// perform some manipulation
}
}
Only HTML responses are available for manipulation. The response from proxying CSS files is not accessible, and logging confirms that those requests are not intercepted by the responseInterceptor.
Version: "http-proxy-middleware": "^3.0.5",
Is this expected behaviour, or am I missing something obvious?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Does the
responseInterceptor
only intercept certain types of request responses, that can then be modified if required?I'm using
http-proxy-middleware
to proxy an entire website, including all assets; images, CSS, JS. I can tell that the CSS for example, is being proxied successfully by logging request URLs in myrouter
; however, in my response handler:Only HTML responses are available for manipulation. The response from proxying CSS files is not accessible, and logging confirms that those requests are not intercepted by the
responseInterceptor
.Version:
"http-proxy-middleware": "^3.0.5",
Is this expected behaviour, or am I missing something obvious?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions