-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
adding proxy_set_header entries using an annotation #180
Comments
@gregdaybreak I think the syntax |
yeah I am really just trying to figure out the best way to add this. If it is through configmap that is fine with me. I was not sure what the best way to do it was so figured I would ask. Would I just need to create a configmap like this:
|
I think the global value of Something like:
|
@aledbf If I understand correctly it is currently only possible to add a global set of custom headers that is used by all Ingresses managed by the Ingress Controller? I was hoping that I would be able to assign a set of customer headers to a specific Ingress. For example security related headers such as Public-Key-Pins, X-Frame-Options & X-Content-Type-Options can be different for each deployment we run on our Kubernetes cluster. Would it be possible to add specific headers for an Ingress using annotations, overriding the globally set values if present in the ConfigMap configuration? |
To answer my own question: custom headers per ingress can be done using configuration-snippets: https://github.com/kubernetes/ingress/tree/master/examples/customization/configuration-snippets/nginx |
yep, I guess this annotation is missing here: https://github.com/kubernetes/ingress/blob/master/controllers/nginx/configuration.md#annotations |
…uration snippets was missing from the configuration documentation
How can i add proxy_set_header X-Forwarded-Proto $scheme in nginx-ingress |
"proxy_set_header" adds the header to the request, while "more_set_headers" adds the header to the response, the opposite of what is being asked. |
The proposal is to add support of adding a new proxy_set_header entry to the nginx config using an annotation.
For example I need to add
proxy_set_header X-Request-Start "t=${msec}”;
in order to report request queuing in New Relic.
from: https://docs.newrelic.com/docs/apm/applications-menu/features/request-queue-server-configuration-examples
Would be nice to be able to do this in an annotation like:
The text was updated successfully, but these errors were encountered: