fix ipv4 location header on dualstack
This commit is contained in:
parent
1550350e05
commit
c8938fc033
@ -264,9 +264,10 @@ class HttpCli(object):
|
||||
self.is_https = (
|
||||
self.headers.get("x-forwarded-proto", "").lower() == "https" or self.tls
|
||||
)
|
||||
self.host = self.headers.get("host") or "{}:{}".format(
|
||||
*list(self.s.getsockname()[:2])
|
||||
)
|
||||
self.host = self.headers.get("host")
|
||||
if not self.host:
|
||||
zs = "{}:{}".format(*list(self.s.getsockname()[:2]))
|
||||
self.host = zs[7:] if zs.startswith("::ffff:") else zs
|
||||
|
||||
n = self.args.rproxy
|
||||
if n:
|
||||
|
Loading…
Reference in New Issue
Block a user