Prevent brute force login attack

This commit is contained in:
Chocobozzz 2018-03-29 10:58:24 +02:00
parent 23f4c3d412
commit 490b595a01
No known key found for this signature in database
GPG key ID: 583A612D890159BE
16 changed files with 189 additions and 22 deletions

View file

@ -48,6 +48,9 @@ if (errorMessage !== null) {
throw new Error(errorMessage)
}
// Trust our proxy (IP forwarding...)
app.set('trust proxy', CONFIG.TRUST_PROXY)
// ----------- Database -----------
// Initialize database and models
@ -81,6 +84,7 @@ if (isTestInstance()) {
) {
return (cors({
origin: 'http://localhost:3000',
exposedHeaders: 'Retry-After',
credentials: true
}))(req, res, next)
}