-
The following code will fail : const { createProxyMiddleware } = require('http-proxy-middleware');
require('express')().use(
'/',
createProxyMiddleware({
target: 'http://failhtis/'
})
).listen(3000); This will display this in my browser : And in my console :
What I would love to do is generate a custom message / html for the error. How do I manage that? I've tried the To sum up: I know error will happen in my setup, how do I send a custom answer instead of the "Error occured while proxying..." message? |
Beta Was this translation helpful? Give feedback.
Answered by
ColinFay
Dec 20, 2022
Replies: 1 comment
-
I just found the answer to my question, I wasn't looking into the doc of the correct version. Here it is for v2
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ColinFay
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just found the answer to my question, I wasn't looking into the doc of the correct version.
Here it is for v2