ngx_security_headers
ngx_security_headers copied to clipboard
How to use it on Windows's nginx?
I'm using a Windows server with nginx and I want to use this to hide nginx in header. It appears I need to compile nginx with this module which seems to be quite complicated. Is there any released binary that I can use it easily?
There are no precompiled binaries at the moment, and there's no plan to support them. Someone close to Windows development maybe can contribute the binaries.
For hiding just the server header, you can do this:
server_tokens off;
more_clear_headers 'Server';
server_tokens is to remove the version string from the default error pages.
more_clear_headers requires you have the headers more module which isn't part of the official NGINX source, but is a popular module which often exists as "extras", I don't know if any Windows builds provide this though. It is available in various Linux package managers.