Compare commits
No commits in common. "ed66f264ff2fd899fe73948eba0af794888e9741" and "e7da5de2553c2a684cae448f87b931980442da9a" have entirely different histories.
ed66f264ff
...
e7da5de255
1 changed files with 2 additions and 5 deletions
|
@ -15,10 +15,7 @@ const app = express.Router();
|
||||||
const createAccountLimiter = rateLimit({
|
const createAccountLimiter = rateLimit({
|
||||||
windowMs: 60 * 60 * 1000, // 1 hour window
|
windowMs: 60 * 60 * 1000, // 1 hour window
|
||||||
max: 10, // start blocking after 5 requests
|
max: 10, // start blocking after 5 requests
|
||||||
message: JSON.stringify({
|
message: "You are being rate limited"
|
||||||
error: true,
|
|
||||||
message: "ERROR_RATE_LIMITED"
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mongoose.connect(config.mongoUrl, {useNewUrlParser: true, useUnifiedTopology: true});
|
mongoose.connect(config.mongoUrl, {useNewUrlParser: true, useUnifiedTopology: true});
|
||||||
|
|
Reference in a new issue