aboutsummaryrefslogtreecommitdiff
path: root/src/api/structures/Server.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2020-12-25 02:08:54 +0900
committerPitu <[email protected]>2020-12-25 02:08:54 +0900
commit09d8d02e6c11bb4aea9cd129bf195868bab0738f (patch)
treef97c1b51d35c519b7788d38a4cbe3e2799d17c63 /src/api/structures/Server.js
parentRemove flexsearch (diff)
downloadhost.fuwn.me-09d8d02e6c11bb4aea9cd129bf195868bab0738f.tar.xz
host.fuwn.me-09d8d02e6c11bb4aea9cd129bf195868bab0738f.zip
Cleanup
Diffstat (limited to 'src/api/structures/Server.js')
-rw-r--r--src/api/structures/Server.js23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/api/structures/Server.js b/src/api/structures/Server.js
index 0ef91fd..6a4abaa 100644
--- a/src/api/structures/Server.js
+++ b/src/api/structures/Server.js
@@ -7,9 +7,7 @@ const RateLimit = require('express-rate-limit');
const bodyParser = require('body-parser');
const jetpack = require('fs-jetpack');
const path = require('path');
-const morgan = require('morgan');
const log = require('../utils/Log');
-const ThumbUtil = require('../utils/ThumbUtil');
// eslint-disable-next-line no-unused-vars
const rateLimiter = new RateLimit({
@@ -35,27 +33,6 @@ class Server {
});
this.server.use(bodyParser.urlencoded({ extended: true }));
this.server.use(bodyParser.json());
- if (process.env.NODE_ENV !== 'production') {
- this.server.use(morgan('combined', {
- skip(req) {
- let ext = req.path.split('.').pop();
- if (ext) { ext = `.${ext.toLowerCase()}`; }
-
- if (
- ThumbUtil.imageExtensions.indexOf(ext) > -1 ||
- ThumbUtil.videoExtensions.indexOf(ext) > -1 ||
- req.path.indexOf('_nuxt') > -1 ||
- req.path.indexOf('favicon.ico') > -1
- ) {
- return true;
- }
- return false;
- },
- stream: {
- write(str) { log.debug(str); }
- }
- }));
- }
// this.server.use(rateLimiter);
// Serve the uploads