6
votes

I using NGINX Ingress Controller in Kubernetes cluster, need to hide the Nginx version information for the client request. since Nginx configuration file generated dynamically. What is the best way to include below line in nginx.conf file?

server_tokens off

Thanks SR

1
thanks, this need ot go in http snippet sectionsfgroups

1 Answers

6
votes

If you look at the configs you'll see that server_tokens can be either in the http, server, location contexts in your nginx.conf. So, on the nginx ingress controller to it really depends on where you want to add that setting (and how):