Do not intercept errors from the custom error service
@@ -490,6 +490,8 @@ stream {
location @custom_{{ $errCode }} {
internal;
+ proxy_intercept_errors off;
+
proxy_set_header X-Code {{ $errCode }};
proxy_set_header X-Format $http_accept;
proxy_set_header X-Original-URI $request_uri;
@@ -497,6 +499,7 @@ stream {
proxy_set_header X-Ingress-Name $ingress_name;
proxy_set_header X-Service-Name $service_name;
+ rewrite (.*) / break;
proxy_pass http://upstream-default-backend;
}
{{ end }}
