Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
adding proxy_set_header entries using an annotation #180
Comments
|
@gregdaybreak I think the syntax |
gregdaybreak
commented
Jan 26, 2017
|
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
referenced this issue
Feb 7, 2017
Merged
Add support for custom proxy headers using a ConfigMap #246
aledbf
closed this
in
#246
Feb 16, 2017
|
@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 |
gregdaybreak commentedJan 26, 2017
•
Edited 1 time
-
gregdaybreak
Jan 26, 2017
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: