✌️
This commit is contained in:
parent
338cac395d
commit
d9a05e962d
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ app.use(morgan(process.env.NODE_ENV == 'production' ? 'combined' : 'dev', {
|
||||||
stream: config.accesslog ? fs.createWriteStream(config.accesslog) : null
|
stream: config.accesslog ? fs.createWriteStream(config.accesslog) : null
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Drop request that without 'Host' header
|
// Drop request when without 'Host' header
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
if (!req.headers['host']) {
|
if (!req.headers['host']) {
|
||||||
res.sendStatus(400);
|
res.sendStatus(400);
|
||||||
|
|
Loading…
Reference in a new issue