NGINX Ingress Controller hide Nginx version

11/29/2018

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

-- sfgroups
kubernetes
nginx-ingress

1 Answer

11/29/2018

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):

-- Rico
Source: StackOverflow