mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +00:00
👌
This commit is contained in:
parent
f29f208e52
commit
9b204b6c27
@ -15,6 +15,10 @@ fs.existsSync('./' + config.uploads.folder + '/thumbs') || fs.mkdirSync('./' + c
|
||||
|
||||
safe.set('trust proxy', 1)
|
||||
|
||||
let limiter = new rateLimit({ windowMs: 5000, max: 2 })
|
||||
safe.use('/api/login/', limiter)
|
||||
safe.use('/api/register/', limiter)
|
||||
|
||||
safe.use(bodyParser.urlencoded({ extended: true }))
|
||||
safe.use(bodyParser.json())
|
||||
|
||||
@ -22,10 +26,6 @@ safe.use('/', express.static('./uploads'))
|
||||
safe.use('/', express.static('./public'))
|
||||
safe.use('/api', api)
|
||||
|
||||
let limiter = new rateLimit({ windowMs: 5000, max: 2 })
|
||||
safe.use('/api/login/', limiter)
|
||||
safe.use('/api/register/', limiter)
|
||||
|
||||
safe.get('/', (req, res, next) => res.sendFile('home.html', { root: './pages/' }))
|
||||
safe.get('/faq', (req, res, next) => res.sendFile('faq.html', { root: './pages/' }))
|
||||
safe.get('/auth', (req, res, next) => res.sendFile('auth.html', { root: './pages/' }))
|
||||
|
Loading…
Reference in New Issue
Block a user