We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98c4cad commit cdde120Copy full SHA for cdde120
nginx/modsecurity/ngx_http_modsecurity.c
@@ -364,12 +364,7 @@ ngx_http_modsecurity_load_request(ngx_http_request_t *r)
364
/* &r->headers_in.user); */
365
req->parsed_uri.fragment = (char *)ngx_pstrdup0(r->pool, &r->exten);
366
367
- if (&r->headers_in != NULL && &r->headers_in.server != NULL) {
368
- req->hostname = (char *)ngx_pstrdup0(r->pool, &r->headers_in.server);
369
- } else {
370
- req->hostname = (char *)ngx_pstrdup0(r->pool,
371
- (ngx_str_t *)&ngx_cycle->hostname);
372
- }
+ req->hostname = (char *)ngx_pstrdup0(r->pool, &r->headers_in.server);
373
374
if (r->header_only) {
375
req->header_only = r->header_only;
0 commit comments