-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom-http-errors without proxy_intercept_errors #8376
Comments
I'd be open to contributing a merge-request, if that helps solving the issue :) |
@JohannesLamberts: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I have added a new flag as an ingress annotation and to the global configuration called Setting this to Due to this silly CLA system in place for contributions it makes it very difficult for me to contribute this directly... https://github.com/GerryWilko/ingress-nginx/tree/patch-1 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@stromvirvel: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Use case
In our setup, we tried to replace the default NGINX-Error Page with custom error pages. One requirement is, that error-pages from backends are unchanged.
Example:
The problem
According to the docs at https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#custom-http-errors
This implicit setting of
proxy_intercept_errors
leads to the behaviour, that the body is replaced with the custom error page, if the status code is contained in the custom-http-errors.I see no way to override this, as the
location-snippet
is included in https://github.com/kubernetes/ingress-nginx/blob/main/rootfs/etc/nginx/template/nginx.tmpl#L1335 beforeproxy_intercept_errors
is set. Even if that wasn't the case, an override should not rely on an implementation detail.Not using the
custom-http-errors
and setting the full configuration via a customlocation-snippet
is not really feasible, as we do not only need to set theerror_page
directive, but also set the required HTTP Headers such asX-Code
. This is activated implicitly as well as described in https://kubernetes.github.io/ingress-nginx/user-guide/custom-errors/.Suggestion
It would be great, to extend the ConfigMap options, so that one can override the
proxy_intercept_errors
setting.The text was updated successfully, but these errors were encountered: