-
Notifications
You must be signed in to change notification settings - Fork 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
server-tokens not honoured? #226
Comments
@omerlh It might be the case that you're using this Ingress controller -- https://github.com/kubernetes/ingress-nginx , as we don't provide a helm chart. Please refer to its documentation, as some differences exist between the Ingress controllers. |
Thanks, this is the behavior I noticed. I'll look if there is a way to remove this header at all, or change it value. |
It is possible to remove or change this header. However, this features is available only in NGINX Plus, the commercial version of NGINX. |
Ok, thanks! |
@omerlh The ingress-nginx controller is built with the headers-more-nginx-module so you can use the
https://github.com/openresty/headers-more-nginx-module#more_clear_headers |
@omerlh
|
I did something similar, this is part of the
And it is working pretty well :) |
@omerlh @pleshakov It is possible to remove the entire Nginx server header, No need to purchase an expensive NGINX Plus license as it can be solved easily. Therefore. I was looking for the same solution and came across this post. I found this patch at the following thread: https://community.centminmod.com/threads/patch-nginx-server-header-removal.14976/ Overall once again. It is quite simple. Apply patch and you are done! |
@xetorixik thank you . |
No thanks to you @iponnam . It took me a while to find a solution. I know how frustrating it can be if there is no solution available. P.s. as because I am subscribed to the channel of Buik. There is another patch update. Good luck. |
@iponnam @xetorixik If you use the k8s-maintained nginx controller, you don't need a patch for this. Per my earlier comment, the k8s-maintained nginx controller includes the headers-more module so this can be accomplished with the LIke @omerlh suggested, you can accomplish this by including an http-snippet in the controller values: controller:
config:
http-snippet: |
more_clear_headers Server; Setting And as of the v0.17.0 release (still in development), |
@bfin Thanks - Worked fine for me! |
Just FYI, |
Hi, from your code snippet it looks like you are using helm to deploy your charts, is this right? Im currently using helm to deploy to a google kubernetes cluster, but struggling to get the x-powered-by hide working My values.xml is ;
But still can't get it to hide the php version |
Looks like I've finally cracked this
|
Using the helm chart from https://kubernetes.github.io/ingress-nginx, the correct configuration is
@see kubernetes/ingress-nginx@466ba7d#diff-9d5b1b69cf78e84e6d53c19a176fa404dd4bb4fe7cfaabdc491ef725bcc8daed |
Thanks for the update on this 5 year old thread @ccurdt I believe the way to handle this with this project would be to use snippets. |
I'm trying to disable the
server:nginx
response header, and look like setting the following in the config map should do that:I'm using the following helm chart
values.yaml
to deploy it:And look like it should work, but when testing it (accessing the
/helthz
endpoint), I still see this header. Could you help me figure out what I'm missing?The text was updated successfully, but these errors were encountered: