Sende 404 wenn Host im Reqeust unbekannt
This commit is contained in:
parent
bc1770a768
commit
b6e1f514be
@ -53,8 +53,11 @@ http.createServer(function(req, res) {
|
|||||||
res.end();
|
res.end();
|
||||||
} else {
|
} else {
|
||||||
// HTTP status 404: NotFound
|
// HTTP status 404: NotFound
|
||||||
res.status(404)
|
res.writeHead(404, {
|
||||||
.send('Not found - use https instead!');
|
"Content-Type": "text/plain"
|
||||||
|
});
|
||||||
|
res.write("404 Not Found - use https instead!\n");
|
||||||
|
res.end();
|
||||||
};
|
};
|
||||||
}).listen(app_cfg.global.http_port);
|
}).listen(app_cfg.global.http_port);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user