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 {
120
120
// By default this is disabled
121
121
EnableAccessLogForDefaultBackend bool `json:"enable-access-log-for-default-backend"`
122
122
123
+ // EnableAuthAccessLog enable auth access log
124
+ // By default this is disabled
125
+ EnableAuthAccessLog bool `json:"enable-auth-access-log"`
126
+
123
127
// AccessLogPath sets the path of the access logs for both http and stream contexts if enabled
124
128
// http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log
125
129
// http://nginx.org/en/docs/stream/ngx_stream_log_module.html#access_log
@@ -858,6 +862,7 @@ func NewDefault() Configuration {
858
862
AccessLogPath : "/var/log/nginx/access.log" ,
859
863
AccessLogParams : "" ,
860
864
EnableAccessLogForDefaultBackend : false ,
865
+ EnableAuthAccessLog : false ,
861
866
WorkerCPUAffinity : "" ,
862
867
ErrorLogPath : "/var/log/nginx/error.log" ,
863
868
BlockCIDRs : defBlockEntity ,
Original file line number Diff line number Diff line change @@ -1103,7 +1103,9 @@ stream {
1103
1103
opentelemetry_propagate;
1104
1104
{{ end }}
1105
1105
1106
+ {{ if not $all.Cfg.EnableAuthAccessLog }}
1106
1107
access_log off;
1108
+ {{ end }}
1107
1109
1108
1110
# Ensure that modsecurity will not run on an internal location as this is not accessible from outside
1109
1111
{{ if $all.Cfg.EnableModsecurity }}
You can’t perform that action at this time.
0 commit comments