Skip to content

Commit 48a8a7a

Browse files
committed
Overwrite existing headers
1 parent a05de4a commit 48a8a7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ngx_http_security_headers_module.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ ngx_http_security_headers_filter(ngx_http_request_t *r)
157157
if (h_server == NULL) {
158158
return NGX_ERROR;
159159
}
160+
ngx_str_set(&h_server->key, "Server");
161+
ngx_str_set(&h_server->value, "");
160162
r->headers_out.server = h_server;
161163
}
162164
h_server->hash = 0;

0 commit comments

Comments
 (0)