Comments (7)
@mcarboni-redant how are you handling errors that get raised from ipfilter?
from express-ipfilter.
Hello @ryanbillingsley , I'm using the following code:
app.use(function(err, req, res) {
console.error('Error handler', err)
res.sendStatus(err.status || 500)
})
But seems that isn't reached
from express-ipfilter.
@ryanbillingsley I've solved, I didn't know that express counts the number of arguments to know which functions are error handlers
from express-ipfilter.
@mcarboni-redant great, glad you found a solution 👍
from express-ipfilter.
Can I suggest to put in the readme a little section about error handling for Ip Filter?
From the code in the folder "examples" I've found that the package exports an error type called IpDeniedError.
from express-ipfilter.
@mcarboni-redant yes, that is a good idea. thanks
from express-ipfilter.
Added documentation
from express-ipfilter.
Related Issues (20)
- improve filter ranges with dash notation HOT 3
- This could be easily bypassed HOT 4
- How about using res.send() instead of res.end()
- 0.1.0 introduced localhost issue HOT 4
- Support for logging only denials HOT 2
- deprecated express function in example
- Not blocking requests from "unallowed" CIDR addresses HOT 5
- Multiple x-forwarded-for IPs HOT 6
- Logging excluded paths
- This breaks on ipv4 => ipv6 conversion HOT 7
- I would like to be able to update the ip list of excluded ips
- Problem when testing for IP addresses that come with a port? HOT 3
- Allow `ipfilter` to take a function that returns either a single IP or an array of IPs HOT 1
- Problem with ip module requires change of recent pull request HOT 1
- Error on Access Denied HOT 2
- Update IP block list HOT 2
- No typescript definitions available
- Dependency on lodash 3, which suffers from security vulnerabilities HOT 1
- Move default getClientIp to use proxy-addr, just like express does.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-ipfilter.