Managing a whitelist for _/nginx_status (#2187)
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
This commit is contained in:
parent
6bc4dad38a
commit
385368990c
8 changed files with 79 additions and 32 deletions
|
|
@ -1011,8 +1011,14 @@ stream {
|
|||
# this is required to avoid error if nginx is being monitored
|
||||
# with an external software (like sysdig)
|
||||
location /nginx_status {
|
||||
allow 127.0.0.1;
|
||||
{{ if $all.IsIPV6Enabled }}allow ::1;{{ end }}
|
||||
{{ range $v := $all.NginxStatusIpv4Whitelist }}
|
||||
allow {{ $v }};
|
||||
{{ end }}
|
||||
{{ if $all.IsIPV6Enabled -}}
|
||||
{{ range $v := $all.NginxStatusIpv6Whitelist }}
|
||||
allow {{ $v }};
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
deny all;
|
||||
|
||||
access_log off;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue