Fix error when no url is provided
This commit is contained in:
@@ -24,7 +24,7 @@ var ApiController = function(app) {
|
||||
}
|
||||
|
||||
// Block requests to unwanted websites (=spam)
|
||||
if (isBlocked(req.body.url)) {
|
||||
if (req.body.url && isBlocked(req.body.url)) {
|
||||
console.error('Test blocked for URL: %s', req.body.url);
|
||||
res.status(403).send('Forbidden');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user