-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: reusable ip-based firewall/rate limiting, hmac on admin rpc #24
Conversation
|
||
match self { | ||
ConnectionPolicy::Blacklist(blacklist) => { | ||
if blacklist.contains(&ip) { |
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.
nit: a small optimization would be to call remove directly.
pub hmac_secret: Option<PathBuf>, | ||
} | ||
|
||
impl From<Config> for FirewallConfig { |
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.
Is this needed considering firewall
is a public field?
pub rate_limiting: RateLimitingConfig, | ||
} | ||
|
||
// todo stricter defaults? |
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.
When in doubt, I tend to avoid the default and let the users decide so that there are no suprises. Makes debugging easier imo.
969a4ae
to
9ad72ad
Compare
9e38e0c
to
eaa0826
Compare
also: