[nginx] Fixed server name in HTTP/1.x with "server_tokens off;".

Maxim Dounin mdounin at mdounin.ru
Sun Feb 25 21:43:07 UTC 2024


details:   http://freenginx.org/hg/nginx/rev/0b51902d9f24
branches:  
changeset: 9222:0b51902d9f24
user:      Tatsuya Kaneko <catatsuy at catatsuy.org>
date:      Mon Feb 26 00:40:58 2024 +0300
description:
Fixed server name in HTTP/1.x with "server_tokens off;".

Missed in 9213:23f109f0facc.

diffstat:

 src/http/ngx_http_header_filter_module.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -46,7 +46,7 @@ ngx_module_t  ngx_http_header_filter_mod
 };
 
 
-static u_char ngx_http_server_string[] = "Server: nginx" CRLF;
+static u_char ngx_http_server_string[] = "Server: " NGINX_NAME CRLF;
 static u_char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
 static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF;
 



More information about the nginx-devel mailing list