diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index dd76b99e3..f220368da 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1631,6 +1631,10 @@ ngx_http_server_addr(ngx_http_request_t *r, ngx_str_t *s) } r->in_addr = sin.sin_addr.s_addr; + + } else { + sin.sin_family = c->sockaddr->sa_family; + sin.sin_addr.s_addr = r->in_addr; } if (s == NULL) {