if (r->headers_out.server == NULL) {
if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) {
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0,
"http2 output header: \"server: %s\"",
NGINX_VER);
} else if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_BUILD) {
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0,
"http2 output header: \"server: %s\"",
NGINX_VER_BUILD);
} else {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, fc->log, 0,
"http2 output header: \"server: nginx\"");
}
在 2018年2月5日星期一 UTC+8下午4:38:43,Louis He写道:
HTTP/2 200
server: openresty
date: Mon, 05 Feb 2018 08:31:55 GMT
content-type: text/html; charset=utf-8
这个是默认的,我改了
src/core/nginx.h
ngx_http_header_filter_module.c
ngx_http_special_response.c
http1.1是改过来了,但是http2还是显示openresty。
谢谢