Fix monitoring being blocked
This commit is contained in:
@@ -13,6 +13,13 @@ var apiLimitsMiddleware = function(req, res, next) {
|
||||
if (req.path.indexOf('/api/') === 0 && !res.locals.hasApiKey) {
|
||||
|
||||
|
||||
// Monitoring requests
|
||||
if (req.path === '/api/runs' && req.method === 'GET') {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
// New tests
|
||||
if (req.path === '/api/runs' && req.method === 'POST') {
|
||||
|
||||
if (!runsTable.accepts(ipAddress)) {
|
||||
@@ -24,6 +31,7 @@ var apiLimitsMiddleware = function(req, res, next) {
|
||||
|
||||
}
|
||||
|
||||
// Every other calls
|
||||
if (!callsTable.accepts(ipAddress)) {
|
||||
// Sorry :/
|
||||
debug('Too many API requests from IP address %s', ipAddress);
|
||||
|
||||
Reference in New Issue
Block a user