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';
|
||||
|
||||
forwarded_for_ = StringRef{buf.base, p};
|
||||
} else if (!faddr_->accept_proxy_protocol &&
|
||||
!config->conn.upstream.accept_proxy_protocol) {
|
||||
} else {
|
||||
init_forwarded_for(family, ipaddr_);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue