Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ready check failed: NOAUTH Authentication required. #79

Open
Cariaga opened this issue Nov 19, 2018 · 0 comments
Open

Ready check failed: NOAUTH Authentication required. #79

Cariaga opened this issue Nov 19, 2018 · 0 comments

Comments

@Cariaga
Copy link

Cariaga commented Nov 19, 2018

`var failCallback = function (req, res, next, nextValidRequestDate) {
console.log("DDOS Attempt Ip now Blocked");
res.sendStatus(429); // brute force protection triggered, send them back to the login page
};
var ExpressBrute = require('express-brute'),
RedisStore = require('express-brute-redis');
var store = new RedisStore({
host: process.env.REDIS_PORT_6379_TCP_ADDR||'localhost', port: process.env.REDIS_PORT_6379_TCP_PORT||6379,no_ready_check: true,auth_pass:'mypassword'
});

var handleStoreError = function (error) {
log.error(error); // log this error so we can figure out what went wrong
// cause node to exit, hopefully restarting the process fixes the problem
throw {
message: error.message,
parent: error.parent
};
}

module.exports.globalBruteforce = new ExpressBrute(store, {
freeRetries: 1000,
attachResetToRequest: false,
refreshTimeoutOnRequest: false,
minWait: 2560601000, // 1 day 1 hour (should never reach this wait time)
maxWait: 25
60601000, // 1 day 1 hour (should never reach this wait time)
lifetime: 246060, // 1 day (seconds not milliseconds)
failCallback: failCallback,
handleStoreError: handleStoreError
});
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant