nghttpx: Always call init_forwarded_for
Always call init_forwarded_for to get the default when source address in PROXY protocol is ignored. This ensures that forwarded header field has the same value as x-forwarded-for.
This commit is contained in:
parent
c60ea227cc
commit
854e9fe395
|
@ -447,8 +447,7 @@ ClientHandler::ClientHandler(Worker *worker, int fd, SSL *ssl,
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
forwarded_for_ = StringRef{buf.base, p};
|
forwarded_for_ = StringRef{buf.base, p};
|
||||||
} else if (!faddr_->accept_proxy_protocol &&
|
} else {
|
||||||
!config->conn.upstream.accept_proxy_protocol) {
|
|
||||||
init_forwarded_for(family, ipaddr_);
|
init_forwarded_for(family, ipaddr_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue