10.1
This commit is contained in:
@@ -13,9 +13,9 @@ module.exports = {
|
||||
const { sig, ts } = req.headers;
|
||||
const salt = SysConfig.LIMITSALT;
|
||||
const my = crypto.hash(ts + req.path + salt, { hasher: 'md5' });
|
||||
const invalid = sig !== my || Date.now() - ts > 60000;
|
||||
const invalid = sig !== my || Date.now() - ts > 5000;
|
||||
if (invalid) {
|
||||
return res.status(403).send('unauthorized');
|
||||
return res.status(408).send('timeout');
|
||||
}
|
||||
}
|
||||
if(!ignoreToken.includes(req.path)) {
|
||||
|
||||
Reference in New Issue
Block a user