Fix error when no url is provided
This commit is contained in:
parent
92fce802c5
commit
def0144dab
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue