fix: msg
This commit is contained in:
parent
0bb90808f4
commit
6f53f55208
|
@ -23,13 +23,9 @@ export function createHttpServer() {
|
||||||
target: 'http://127.0.0.1:31345',
|
target: 'http://127.0.0.1:31345',
|
||||||
});
|
});
|
||||||
proxy.on('error', (err, req, res) => {
|
proxy.on('error', (err, req, res) => {
|
||||||
if (!(res instanceof ServerResponse)) {
|
if (res instanceof ServerResponse) {
|
||||||
return;
|
res.status(502).end('Bad Gateway (WDS)');
|
||||||
}
|
}
|
||||||
res.writeHead(500, {
|
|
||||||
'Content-Type': 'text/plain',
|
|
||||||
});
|
|
||||||
res.end('Bad Proxy');
|
|
||||||
});
|
});
|
||||||
app.get('*', (req, res) => proxy.web(req, res));
|
app.get('*', (req, res) => proxy.web(req, res));
|
||||||
httpServer.on('close', () => proxy.close());
|
httpServer.on('close', () => proxy.close());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user