Description
What happened:
I built a custom-error-pages docker image that contains my pages with media content, e.g. png/jpg images. Then I tried to deploy it as the default backend.
But when I try to open this error page I don't see my images on the page, eg. icon/backgroud. And as I understand it's because Nginx set Content-Type header text/html for everything.
2024/02/27 11:32:08 serving custom error response for code 404 and format text/html from file /www/404.html
2024/02/27 11:32:28 format not specified. Using text/html
2024/02/27 11:32:28 serving custom error response for code 503 and format text/html from file /www/503.html
2024/02/27 11:32:29 format not specified. Using text/html
What you expected to happen:
Ingress controller has to open my error page with all media content.
Ingress Controller returns, or does not return, X-Format header to the default-backend here
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
v1.9.4
Kubernetes version (use kubectl version
):
Server Version: v1.27.7
Environment:
-
Cloud provider or hardware configuration: Azure
-
OS (e.g. from /etc/os-release): AKSUbuntu-2204gen2containerd-202311.07.0
-
Kernel (e.g.
uname -a
): -
Install tools:
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
-
Basic cluster related info:
kubectl version
kubectl get nodes -o wide
-
How was the ingress-nginx-controller installed:
- If helm was used then please show output of
helm ls -A | grep -i ingress
- If helm was used then please show output of
helm -n <ingresscontrollernamespace> get values <helmreleasename>
- If helm was not used, then copy/paste the complete precise command used to install the controller, along with the flags and options used
- if you have more than one instance of the ingress-nginx-controller installed in the same cluster, please provide details for all the instances
- If helm was used then please show output of
-
Current State of the controller:
kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -A -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
-
Current state of ingress object, if applicable:
kubectl -n <appnamespace> get all,ing -o wide
kubectl -n <appnamespace> describe ing <ingressname>
- If applicable, then, your complete and exact curl/grpcurl command (redacted if required) and the reponse to the curl/grpcurl command with the -v flag
-
Others:
- Any other related information like ;
- copy/paste of the snippet (if applicable)
kubectl describe ...
of any custom configmap(s) created and in use- Any other related information that may help
- Any other related information like ;
How to reproduce this issue:
Anything else we need to know:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status