-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Remove Server Header from Nginx #155
Comments
Hi nazari-ali, Is this the same question as #104 or are you asking for something differently? |
Hi, I want the server name to be completely removed, I use the "server_tokens off;" command in my attachment file I can only remove the Nginx version. I used the links below to remove the Nginx name, but I ran into problems every time. Answer 1 Answer 2 Answer 3 |
So you want to remove the "Server: Someting" that is transmitted in the request. Option 2 is one alternative if you are felling adventurous, you could probably look at the parent containers build scripts. I have not looked into this particular setting as I have never thought about turning it off, so I don't really have a lot of input to this issue, sorry :/ |
For Option 2, can you guide me on what to do? |
I would start at looking at the parent container's Dockerfile, and then see where in those steps the guide you linked would fit in. However, recompiling Nginx is not really anything I have done, but I think there is a guide on the Nginx official page you can look at. |
Hi, This worked for me without any problems. sed -i 's/Server: nginx/My-Header: hi/' Answer: https://stackoverflow.com/questions/246227/how-do-you-change-the-server-header-returned-by-nginx |
Cool! Great find! |
Hi
How can I delete the server header for nginx?
Thankful
The text was updated successfully, but these errors were encountered: