Skip to content

Commit

Permalink
xquic module: fix server_tokens #1827
Browse files Browse the repository at this point in the history
  • Loading branch information
drawing committed Jul 26, 2023
1 parent fb29798 commit f942f54
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/ngx_http_xquic_module/ngx_http_xquic_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,18 @@ ngx_http_xquic_header_filter(ngx_http_request_t *r)

h->hash = 1;
ngx_str_set(&h->key, NGX_HTTP_XQUIC_NAME_SERVER);
if (clcf->server_tokens) {
if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) {
#if (T_NGX_SERVER_INFO)
ngx_str_set(&h->value, TENGINE_VER);
#else
ngx_str_set(&h->value, NGINX_VER);
#endif
} else if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_BUILD) {
#if (T_NGX_SERVER_INFO)
ngx_str_set(&h->value, TENGINE_VER_BUILD);
#else
ngx_str_set(&h->value, NGINX_VER_BUILD);
#endif
} else {
ngx_str_set(&h->value, TENGINE);
}
Expand Down

0 comments on commit f942f54

Please sign in to comment.