From 37ea3d6b22326a1c348dcb2bea913d8e402c1629 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Mon, 4 Sep 2023 20:22:59 +0200 Subject: [PATCH] fixes to satisfy PR comments --- docs/user-guide/nginx-configuration/configmap.md | 4 +++- .../ingress/annotations/disableproxyintercepterrors/main.go | 2 +- internal/ingress/defaults/main.go | 4 ++-- test/e2e/annotations/disableproxyintercepterrors.go | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index 9b91b6122..5396468f9 100644 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -1122,7 +1122,9 @@ Example usage: `custom-http-errors: 404,415` ## disable-proxy-intercept-errors -Allows to disable proxy-intercept-errors if [custom-http-errors](#custom-http-errors) are set. Disabling [proxy_intercept_errors](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors) allows to pass upstream errors to client even if [custom-http-errors](#custom-http-errors) are set. +Allows to disable [proxy-intercept-errors](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors). + +Disabling [proxy_intercept_errors](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors) allows to pass upstream errors to client even if [custom-http-errors](#custom-http-errors) are set. Example usage: `disable-proxy-intercept-errors: "true"` diff --git a/internal/ingress/annotations/disableproxyintercepterrors/main.go b/internal/ingress/annotations/disableproxyintercepterrors/main.go index ac8611087..650d29707 100644 --- a/internal/ingress/annotations/disableproxyintercepterrors/main.go +++ b/internal/ingress/annotations/disableproxyintercepterrors/main.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/internal/ingress/defaults/main.go b/internal/ingress/defaults/main.go index 2f3be97fe..c04f7ffb7 100644 --- a/internal/ingress/defaults/main.go +++ b/internal/ingress/defaults/main.go @@ -34,11 +34,11 @@ type Backend struct { // toggles whether or not to remove trailing slashes during TLS redirects PreserveTrailingSlash bool `json:"preserve-trailing-slash"` - // for use when using CustomHTTPErrors without intecepting service errors + // allows usage of CustomHTTPErrors without intecepting service errors // e.g. custom 404 and 503 when service-a does not exist or is not available // but service-a can return 404 and 503 error codes without intercept // http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors - // By default this is enabled when CustomHTTPErrors is enabled + // By default this is disabled DisableProxyInterceptErrors bool `json:"disable-proxy-intercept-errors"` // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size diff --git a/test/e2e/annotations/disableproxyintercepterrors.go b/test/e2e/annotations/disableproxyintercepterrors.go index 77c89e95e..82598e968 100644 --- a/test/e2e/annotations/disableproxyintercepterrors.go +++ b/test/e2e/annotations/disableproxyintercepterrors.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.