Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ip_addresses():
- for interface in netifaces.interfaces():
- addrs = netifaces.ifaddress(interface)
- for x in (netifaces.AF_INET, netifaces.AF_INET6):
- if x in addrs:
- ip_list.append(addrs[x][0]['addr'])
- return ip_list
- ALLOWED_HOSTS = ip_addresses()
- ALLOWED_HOSTS = ip_addresses()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement