Description
What happened:
I am using nginx.ingress.kubernetes.io/configuration-snippet
together with
nginx.ingress.kubernetes.io/cors-allow-origin
and nginx.ingress.kubernetes.io/enable-cors
annotations.
What you expected to happen:
I expected nginx.ingress.kubernetes.io/configuration-snippet
value to be present in generated nginx.conf
together with the generated code allowing CORS. However I can see only the stuff from configuration-snippet
. It appears the CORS part starting with:
# Cors Preflight methods needs additional options and different Return Code
if ($http_origin ~* ...
is not present in nginx.conf
when you also use configuration-snippet
. I can manually copy that code to configuration-snippet
but I believe this to be a bug. I apologize if this is a known issue already or works like that by design but from Using this annotation you can add additional configuration to the NGINX location
I got the impression both parts should be merged.
-------------------------------------------------------------------------------
NGINX Ingress controller
Release: v1.9.5
Build: f503c4bb5fa7d857ad29e94970eb550c2bc00b7c
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.21.6
-------------------------------------------------------------------------------
Kubernetes version (use kubectl version
):
Server Version: v1.30.3-eks-2f46c53
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status