-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IP filtering #102
base: master
Are you sure you want to change the base?
IP filtering #102
Conversation
orangemiddleware/ipfilter.go
Outdated
} | ||
|
||
if checkIfIpIsBlocked(parsedIp.String()) { | ||
w.WriteHeader(http.StatusUnauthorized) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write to response like this: http.Error(w, http.StatusText(404), 404)
I dunno what the appropriate http code is, so find that out! Bad request (400) is generic, so maybe we can use that unless you find a better one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, ive added the appropriate ones
Can you create a table for banned IPs (like in the wiki) and read banned IPs from that? This will also get you to setup postgres. |
sure , on to it. |
yeah that was the intention , sure if we choose to go with the trie approach lets do it. |
sure was thinking to create some sort of data access module , will move it |
2.Added tests for trie based banned ip search
Minimal changes required for some ip filtering, for further review and inputs only