File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
internal/ingress/controller/config
rootfs/etc/nginx/template Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ type Configuration struct {
120120 // By default this is disabled
121121 EnableAccessLogForDefaultBackend bool `json:"enable-access-log-for-default-backend"`
122122
123+ // EnableAuthAccessLog enable auth access log
124+ // By default this is disabled
125+ EnableAuthAccessLog bool `json:"enable-auth-access-log"`
126+
123127 // AccessLogPath sets the path of the access logs for both http and stream contexts if enabled
124128 // http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log
125129 // http://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log
@@ -858,6 +862,7 @@ func NewDefault() Configuration {
858862 AccessLogPath : "/var/log/nginx/access.log" ,
859863 AccessLogParams : "" ,
860864 EnableAccessLogForDefaultBackend : false ,
865+ EnableAuthAccessLog : false ,
861866 WorkerCPUAffinity : "" ,
862867 ErrorLogPath : "/var/log/nginx/error.log" ,
863868 BlockCIDRs : defBlockEntity ,
Original file line number Diff line number Diff line change @@ -1103,7 +1103,9 @@ stream {
11031103 opentelemetry_propagate;
11041104 {{ end }}
11051105
1106+ {{ if not $all.Cfg.EnableAuthAccessLog }}
11061107 access_log off;
1108+ {{ end }}
11071109
11081110 # Ensure that modsecurity will not run on an internal location as this is not accessible from outside
11091111 {{ if $all.Cfg.EnableModsecurity }}
You can’t perform that action at this time.
0 commit comments