Refactor masterKeyIps and update readme (#4050)
* update choose_password to have the confirmation * just a revert to the old one * refactor and update readme * just revert some spaces
This commit is contained in:
committed by
Florent Vilmart
parent
952e64d94a
commit
52c4dd3704
@@ -111,8 +111,7 @@ export function handleParseHeaders(req, res, next) {
|
||||
req.config.headers = req.headers || {};
|
||||
req.info = info;
|
||||
|
||||
const ip = getClientIp(req);
|
||||
if (info.masterKey && req.config.masterKeyIps && req.config.masterKeyIps.length !== 0 && req.config.masterKeyIps.indexOf(ip) === -1) {
|
||||
if (info.masterKey && req.config.masterKeyIps && req.config.masterKeyIps.length !== 0 && req.config.masterKeyIps.indexOf(getClientIp(req)) === -1) {
|
||||
return invalidRequest(req, res);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user