Closed popcorn closed 5 months ago
The change looks good, nice work. Although, my only concern is that it's possible for the key to contain sensitive information.
Caddy does have config options to redact certain fields, but its HTTP server, for example, redacts certain values by default (sensitive header fields for instance). I wonder if we should make this an opt-in thing. :thinking:
Good thinking @mholt.
I updated the code, squashed it into a single commit and pushed.
Also I run the tests with log_key
not set, set to false and true. Works as expected.
Let me know what you think.
Cool! Do I need to do anything else in order for this to get merged?
Nope. :)
Amazing, my first code contribution to Caddy ðŸ¤
Cheers!
Congrats!
Why?
I'd like to know the key for which the rate limit has been exceeded.
Test
I tested both for
distributed: {}
and without it.Caddy JSON rate limit setup
Resulting logs (prettified)
I'm not an expert in Go so please let me know if this is good enough to merge.
Cheers!