We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de3a71d commit d275bc2Copy full SHA for d275bc2
1 file changed
src/ngx_http_security_headers_module.c
@@ -189,18 +189,9 @@ ngx_http_security_headers_filter(ngx_http_request_t *r)
189
190
191
/* Deal with Server header */
192
- ngx_table_elt_t *h_server;
193
- h_server = r->headers_out.server;
194
- if (h_server == NULL) {
195
- h_server = ngx_list_push(&r->headers_out.headers);
196
197
- return NGX_ERROR;
198
- }
199
- h_server->value.len = 0;
200
- h_server->value.data = (u_char *) "";
201
- h_server->hash = 0;
202
- r->headers_out.server = h_server;
203
+ ngx_str_set(&key, "server");
+ ngx_str_set(&val, "");
+ ngx_set_headers_out_by_search(r, &key, &val);
204
205
/* proceed to the next handler in chain */
206
0 commit comments