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',
|
||||
});
|
||||
proxy.on('error', (err, req, res) => {
|
||||
if (!(res instanceof ServerResponse)) {
|
||||
return;
|
||||
if (res instanceof ServerResponse) {
|
||||
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));
|
||||
httpServer.on('close', () => proxy.close());
|
||||
|
|
Loading…
Reference in New Issue
Block a user