feat: support enbale nginx debug_connection (#8637)

This commit is contained in:
zou rui 2022-06-10 19:01:46 +08:00 committed by GitHub
parent 0005c080da
commit 2852e2998c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 0 deletions

View file

@ -768,6 +768,11 @@ type Configuration struct {
// GlobalRateLimitStatucCode determines the HTTP status code to return
// when limit is exceeding during global rate limiting.
GlobalRateLimitStatucCode int `json:"global-rate-limit-status-code"`
// DebugConnections Enables debugging log for selected client connections
// http://nginx.org/en/docs/ngx_core_module.html#debug_connection
// Default: ""
DebugConnections []string `json:"debug-connections"`
}
// NewDefault returns the default nginx configuration
@ -932,6 +937,7 @@ func NewDefault() Configuration {
GlobalRateLimitMemcachedMaxIdleTimeout: 10000,
GlobalRateLimitMemcachedPoolSize: 50,
GlobalRateLimitStatucCode: 429,
DebugConnections: []string{},
}
if klog.V(5).Enabled() {