improved ipv6 address checked, thanks Jonathan
This commit is contained in:
1 parent
d5bfaf83ee
commit
8f9f4aae32
4 files changed
+11
-13
No files matched your search
+2
-2
@@ -471,11 +471,11 @@ def wsgibase(environ, responder):
|
||||
local_hosts.add(socket.gethostname())
|
||||
local_hosts.add(fqdn)
|
||||
local_hosts.update([
|
||||
ip[4][0] for ip in getipaddrinfo(fqdn)])
|
||||
addrinfo[4][0] for addrinfo in getipaddrinfo(fqdn)])
|
||||
if env.server_name:
|
||||
local_hosts.add(env.server_name)
|
||||
local_hosts.update([
|
||||
ip[4][0] for ip in getipaddrinfo(env.server_name)])
|
||||
addrinfo[4][0] for addrinfo in getipaddrinfo(env.server_name)])
|
||||
except (socket.gaierror, TypeError):
|
||||
pass
|
||||
global_settings.local_hosts = list(local_hosts)
|
||||
|
||||
Reference in new issue
Block a user