a little error handling
This commit is contained in:
parent
3ec2ee2dfd
commit
623e42e6d7
@ -32,7 +32,7 @@ const ips = ['212.71.255.44', '82.35.75.161'];
|
||||
|
||||
const complexUrls = new Map();
|
||||
|
||||
// app.use(ipfilter(ips, { 'mode': 'allow' }));
|
||||
app.use(ipfilter(ips, { 'mode': 'allow' }));
|
||||
|
||||
app.use((err, req, res, _next) => {
|
||||
console.log('Error handler', err);
|
||||
@ -210,8 +210,7 @@ function getUrl (req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
// app.get('/:encoded_id', cache('15 minutes'), getUrl);
|
||||
app.get('/:encoded_id', getUrl);
|
||||
app.get('/:encoded_id', cache('15 minutes'), getUrl);
|
||||
|
||||
process.on('uncaughtException', function (err) {
|
||||
console.error(err);
|
||||
|
Loading…
Reference in New Issue
Block a user