Skip to content

Commit

Permalink
[release-1.8] Disable Modsecurity from internal processing which affe…
Browse files Browse the repository at this point in the history
…cts large ingresses (#10375)

* Disable Modsecurity from interanl processing

* Fix modsecurity check logic

---------

Co-authored-by: mley <[email protected]>
  • Loading branch information
k8s-infra-cherrypick-robot and markhley authored Sep 7, 2023
1 parent 98170bd commit fb80e6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,11 @@ http {

# default server, used for NGINX healthcheck and access to nginx stats
server {
# Ensure that modsecurity will not run on an internal location as this is not accessible from outside
{{ if $all.Cfg.EnableModsecurity }}
modsecurity off;
{{ end }}

listen 127.0.0.1:{{ .StatusPort }};
set $proxy_upstream_name "internal";

Expand Down

0 comments on commit fb80e6d

Please sign in to comment.