changed the url to /feed/ and reject everything else
This commit is contained in:
parent
0a587fb804
commit
708034e143
@ -179,7 +179,11 @@ app.get('/feed/:encoded_id', getUrl);
|
||||
// app.use(notFoundHandler);
|
||||
|
||||
// Final middleware is our catch-all error handler
|
||||
app.use(defaultErrorHandler);
|
||||
app.get('*', function(req, res, next) {
|
||||
const err = new Error(`${req.ip} tried to access /Forbidden`); // Sets error message, includes the requester's ip address!
|
||||
err.statusCode = 403;
|
||||
next(err);
|
||||
});
|
||||
|
||||
const server = app.listen(port, () => {
|
||||
logger.info(`Server listening on port ${port}`);
|
||||
|
Loading…
Reference in New Issue
Block a user