removing hardcoded user
This commit is contained in:
@@ -26,11 +26,12 @@ function rateLimitMiddleware(metadataBackend, endpointGroup = null) {
|
||||
return next();
|
||||
}
|
||||
|
||||
const user = 'cdb';
|
||||
// const user = res.locals.user;
|
||||
if (!endpointGroup) {
|
||||
endpointGroup = getEndpointGroup();
|
||||
}
|
||||
const user = res.locals.user;
|
||||
|
||||
// TODO: remove comments to move it to global
|
||||
// if (!endpointGroup) {
|
||||
// endpointGroup = getEndpointGroup();
|
||||
// }
|
||||
|
||||
if (!endpointGroup || !isRateLimitEnabledByEndpoint(endpointGroup)) {
|
||||
return next();
|
||||
|
||||
Reference in New Issue
Block a user