mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 23:08:12 +09:00
This commit is contained in:
parent
549c8f95c4
commit
2a8c79e7b2
@ -48,6 +48,7 @@
|
||||
"@types/mocha": "2.2.37",
|
||||
"@types/mongodb": "2.1.37",
|
||||
"@types/monk": "1.0.5",
|
||||
"@types/morgan": "1.7.32",
|
||||
"@types/ms": "0.7.29",
|
||||
"@types/multer": "0.0.32",
|
||||
"@types/ratelimiter": "2.1.28",
|
||||
@ -110,6 +111,7 @@
|
||||
"mocha": "3.2.0",
|
||||
"mongodb": "2.2.21",
|
||||
"monk": "3.1.3",
|
||||
"morgan": "1.7.0",
|
||||
"ms": "0.7.2",
|
||||
"multer": "1.2.1",
|
||||
"nprogress": "0.2.0",
|
||||
|
@ -7,6 +7,7 @@ import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import * as cluster from 'cluster';
|
||||
import * as express from 'express';
|
||||
import * as morgan from 'morgan';
|
||||
import vhost = require('vhost');
|
||||
|
||||
import config from './conf';
|
||||
@ -17,6 +18,10 @@ import config from './conf';
|
||||
const app = express();
|
||||
app.disable('x-powered-by');
|
||||
|
||||
// Log
|
||||
app.use(morgan(
|
||||
process.env.NODE_ENV == 'production' ? 'combined' : 'dev'));
|
||||
|
||||
// Drop request that without 'Host' header
|
||||
app.use((req, res, next) => {
|
||||
if (!req.headers['host']) {
|
||||
|
Loading…
Reference in New Issue
Block a user