Add Validation for Client Body Buffer Size
Adds validation so that if a bad value is input into the client body buffer size annotation then client_body_buffer_size is not set. That way a log error is thrown and it fails gracefully rather than killing the ingress controller.
This commit is contained in:
parent
338df027e8
commit
86357332e3
3 changed files with 78 additions and 3 deletions
|
|
@ -571,7 +571,7 @@ stream {
|
|||
proxy_ssl_server_name on;
|
||||
|
||||
client_max_body_size "{{ $location.Proxy.BodySize }}";
|
||||
{{ if $location.ClientBodyBufferSize }}
|
||||
{{ if isValidClientBodyBufferSize $location.ClientBodyBufferSize }}
|
||||
client_body_buffer_size {{ $location.ClientBodyBufferSize }};
|
||||
{{ end }}
|
||||
|
||||
|
|
@ -640,7 +640,7 @@ stream {
|
|||
{{ end }}
|
||||
|
||||
client_max_body_size "{{ $location.Proxy.BodySize }}";
|
||||
{{ if $location.ClientBodyBufferSize }}
|
||||
{{ if isValidClientBodyBufferSize $location.ClientBodyBufferSize }}
|
||||
client_body_buffer_size {{ $location.ClientBodyBufferSize }};
|
||||
{{ end }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue