Keep the bad guys out >:c (#36)

This commit is contained in:
Caroline 2017-04-27 00:04:19 -07:00 committed by Crawl
parent 4d0c309987
commit ce23b0f19d
2 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
const config = require('./config.js')
const api = require('./routes/api.js')
const express = require('express')
const helmet = require('helmet')
const bodyParser = require('body-parser')
const RateLimit = require('express-rate-limit')
const db = require('knex')(config.database)
@ -14,6 +15,7 @@ fs.existsSync('./' + config.logsFolder) || fs.mkdirSync('./' + config.logsFolder
fs.existsSync('./' + config.uploads.folder) || fs.mkdirSync('./' + config.uploads.folder)
fs.existsSync('./' + config.uploads.folder + '/thumbs') || fs.mkdirSync('./' + config.uploads.folder + '/thumbs')
safe.use(helmet())
safe.set('trust proxy', 1)
let limiter = new RateLimit({ windowMs: 5000, max: 2 })

View File

@ -21,6 +21,7 @@
"express-rate-limit": "^2.6.0",
"fluent-ffmpeg": "^2.1.0",
"gm": "^1.23.0",
"helmet": "^3.5.0",
"knex": "^0.12.6",
"multer": "^1.2.1",
"randomstring": "^1.1.5",