Latest update - 7591

This commit is contained in:
2019-10-24 21:00:01 +09:00
parent 7451bdd624
commit d12bc8b656
8 changed files with 243 additions and 101 deletions
+3 -4
View File
@@ -180,12 +180,11 @@ ngx_http_realip_handler(ngx_http_request_t *r)
case NGX_HTTP_REALIP_PROXY:
value = &r->connection->proxy_protocol_addr;
if (value->len == 0) {
if (r->connection->proxy_protocol == NULL) {
return NGX_DECLINED;
}
value = &r->connection->proxy_protocol->src_addr;
xfwd = NULL;
break;
@@ -238,7 +237,7 @@ found:
!= NGX_DECLINED)
{
if (rlcf->type == NGX_HTTP_REALIP_PROXY) {
ngx_inet_set_port(addr.sockaddr, c->proxy_protocol_port);
ngx_inet_set_port(addr.sockaddr, c->proxy_protocol->src_port);
}
return ngx_http_realip_set_addr(r, &addr);