mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
Simplified demo.html; show proxyError on error
This commit is contained in:
@@ -336,8 +336,8 @@ exports.createServer = function createServer(options) {
|
||||
|
||||
// When the server fails, just show a 404 instead of Internal server error
|
||||
server.proxy.on('proxyError', function(err, req, res) {
|
||||
res.writeHead(404, {});
|
||||
res.end();
|
||||
res.writeHead(404, {'Access-Control-Allow-Origin': '*'});
|
||||
res.end('Not found because of proxy error: ' + err);
|
||||
});
|
||||
|
||||
return server;
|
||||
|
||||
Reference in New Issue
Block a user