Replies: 1 comment
-
|
Can you confirm that you have the -enable-snippets command line argument enable when you deployed the NGINX Ingress Controller? Can you please share your generated NGINX config from the snippet so we can help with you with the troubleshooting? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version
nginx/nginx-ingress:5.3.2
Platform
Amazon EKS
Background
I am migrating from the community Ingress-NGINX Controller to the NGINX Ingress Controller (nginx/kubernetes-ingress) and am running into an issue where if directives inside
nginx.org/location-snippetsignored.In the community ingress-nginx controller, I rely on built-in annotations for rewrite rules and CORS handling. For example
Since the NGINX Ingress Controller does not support these annotations on Ingress resources, I attempted to replicate the same behavior using nginx.org/location-snippets.
Issue
After successfully deployed, I noticed that CORS headers are not conditionally applied and the OPTIONS preflight handling is ignored. While investigating, I noticed that the generated
locationblock includes arewrite ... breakdirective that may be interfering with the snippet logic:My question is what is the recommended way to implement conditional CORS handling and preflight (OPTIONS) responses when using nginx.org/location-snippets alongside rewrite rules?
Beta Was this translation helpful? Give feedback.
All reactions