diff --git a/demo.html b/demo.html index 09e54f0..6307dcf 100644 --- a/demo.html +++ b/demo.html @@ -66,21 +66,19 @@ textarea { diff --git a/lib/cors-anywhere.js b/lib/cors-anywhere.js index a350ba7..3c8d730 100644 --- a/lib/cors-anywhere.js +++ b/lib/cors-anywhere.js @@ -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;