-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
CORS not working when configuration-snippet annotation is used #11990
Comments
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-sigs/prow repository. |
Please write a step-by-step guide here that readers can copy/paste from, on a kind cluster or a minikube cluster. This will help others reproduce the problem and that is required because what you have posted can not be analyzed or debugged. /remove-kind bug |
While working on a minimal reproducible example I figured out what I said before isn't completely true - the snippets are present in the It's really easier with a smaller test case. However there is still the weird behavior but let's go through the example:
I apply this and then to make it simple (provider agnostic) on the ingress controller nginx pod I just do:
(ignore that you get 404 and everything, it's just the header that matters, like I said my use-case is more than that and doesn't involve wildcard Now the strange part is when I change
I don't get the header set. However it's just an empty |
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach |
What happened:
I am using
nginx.ingress.kubernetes.io/configuration-snippet
together withnginx.ingress.kubernetes.io/cors-allow-origin
andnginx.ingress.kubernetes.io/enable-cors
annotations.What you expected to happen:
I expected
nginx.ingress.kubernetes.io/configuration-snippet
value to be present in generatednginx.conf
together with the generated code allowing CORS. However I can see only the stuff fromconfiguration-snippet
. It appears the CORS part starting with:is not present in
nginx.conf
when you also useconfiguration-snippet
. I can manually copy that code toconfiguration-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 fromUsing this annotation you can add additional configuration to the NGINX location
I got the impression both parts should be merged.Kubernetes version (use
kubectl version
):Server Version: v1.30.3-eks-2f46c53
The text was updated successfully, but these errors were encountered: