diff options
| author | Caroline <[email protected]> | 2017-04-27 00:04:19 -0700 |
|---|---|---|
| committer | Crawl <[email protected]> | 2017-04-27 09:04:19 +0200 |
| commit | ce23b0f19dda0b49971ffab5389c5faae80e6cf7 (patch) | |
| tree | 61f445d6d37c555575fa912be02f77f0c761843a /lolisafe.js | |
| parent | Update logo link (diff) | |
| download | host.fuwn.me-ce23b0f19dda0b49971ffab5389c5faae80e6cf7.tar.xz host.fuwn.me-ce23b0f19dda0b49971ffab5389c5faae80e6cf7.zip | |
Keep the bad guys out >:c (#36)
Diffstat (limited to 'lolisafe.js')
| -rw-r--r-- | lolisafe.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lolisafe.js b/lolisafe.js index 57b7e5f..41807f0 100644 --- a/lolisafe.js +++ b/lolisafe.js @@ -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 }) |