Skip to content

Commit

Permalink
(fix) Status code when 404.
Browse files Browse the repository at this point in the history
  • Loading branch information
hormesiel committed Apr 16, 2019
1 parent 4e75b54 commit 7dcfa56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const protect = (url, validator, { directory = process.cwd(), realm = 'default-r
}

// Serve the requested file
serve(req, res, () => res.end('404 Not Found'));
serve(req, res, () => {
res.statusCode = 404;
res.end('404 Not Found');
});
};
};

Expand Down

0 comments on commit 7dcfa56

Please sign in to comment.