[PATCH] HTTP: NGINX_VER_BUILD in Server header and error page tail.

Tom Thorogood me+lists.nginx at tomthorogood.co.uk
Sun May 8 10:27:06 UTC 2016


Hi,

This patch adds a build option to the server_tokens directive. When build is specified the Server header will have a value of NGINX_VER_BUILD. Also the tail of built in error pages will be NGINX_VER_BUILD. off and on are retained as valid values and behave as they always have.

This makes it possible to specify semi-custom server tokens of the form "nginx/<version> (<value>)". <value> is specified with the --build flag for ./configure.

A potential use case is including the name of a custom build for example with --build="super-nginx/0.1". This would give: nginx/1.9.15 (super-nginx/0.1).

Another potential use case of this feature is to include the git revision of a parent build with --build="`git rev-parse --short HEAD`". This would give: nginx/1.9.15 (c3ebabd). In that case the feature can be used to enhance troubleshooting and/or provide more information to end users.

Kind Regards,
Tom Thorogood.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-server-token-build.patch
Type: text/x-patch
Size: 10965 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160508/37a5f29c/attachment.bin>


More information about the nginx-devel mailing list