Log the client address next to the peer address (closes #270)
check / check (push) Waiting to run
check / check (push) Waiting to run
The access log, the rate-limit rejection lines, the CSRF warning and the receiver's "webhook request received" line now carry clientIP, the address the rate limiters key on, next to remoteIP, the connecting peer. Logging works it out once per request from the same code the rate limiters use and stores it on the request context for the other lines. The CSRF and receiver lines name the peer as remoteIP instead of remote_addr. The README documents the field and that it is only as trustworthy as TRUSTED_PROXIES. Model: opus-5-5
This commit is contained in:
@@ -132,6 +132,12 @@ func (g *LoginGuard) TrackedKeysForTest() (int, int) {
|
||||
// passwordChangeRateLimit constant.
|
||||
const PasswordChangeRateLimitConst = passwordChangeRateLimit
|
||||
|
||||
// ReplayRateLimitConst exposes the replayRateLimit constant.
|
||||
const ReplayRateLimitConst = replayRateLimit
|
||||
|
||||
// ResubmitRateLimitConst exposes the resubmitRateLimit constant.
|
||||
const ResubmitRateLimitConst = resubmitRateLimit
|
||||
|
||||
// ReceiverAggregateMultiplierConst exposes the
|
||||
// receiverAggregateMultiplier constant.
|
||||
const ReceiverAggregateMultiplierConst = receiverAggregateMultiplier
|
||||
|
||||
Reference in New Issue
Block a user