Skip to content

Commit 713289b

Browse files
Remove X-Application-Version header
Some applications may use this header to output the client/software versions which is potentially a risk for vulnerability identification/information gathering
1 parent a4f1017 commit 713289b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/ngx_http_security_headers_module.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ ngx_http_security_headers_filter(ngx_http_request_t *r)
225225
ngx_str_set(&key, "x-varnish");
226226
ngx_str_set(&val, "");
227227
ngx_set_headers_out_by_search(r, &key, &val);
228+
229+
/* Hide X-Application-Version */
230+
ngx_str_set(&key, "x-application-version");
231+
ngx_str_set(&val, "");
232+
ngx_set_headers_out_by_search(r, &key, &val);
228233
}
229234

230235
if (1 != slcf->enable) {

0 commit comments

Comments
 (0)