Simplified demo.html; show proxyError on error

This commit is contained in:
Rob Wu
2013-08-29 17:09:20 +02:00
parent cd97423db9
commit a784fc96f8
2 changed files with 21 additions and 34 deletions

View File

@@ -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;