mirror of
https://github.com/swizzin/swizzin_dashboard.git
synced 2024-09-20 06:46:08 +08:00
fix: ipv6 support for sidebar links (#56)
* added ipv6 support for sidebar links * typo --------- Co-authored-by: anonymous <anonymous>
This commit is contained in:
parent
d302facf51
commit
412a5c4f86
|
@ -76,7 +76,12 @@ def generate_page_list(user):
|
|||
else:
|
||||
locks = os.listdir('/install')
|
||||
try:
|
||||
host = request.host.split(":")[0]
|
||||
if "[" in request.host:
|
||||
# Special case to handle IPv6 addresses
|
||||
host = request.host.split("]:")[0]
|
||||
else:
|
||||
# Handle IPv4 addresses
|
||||
host = request.host.split(":")[0]
|
||||
except:
|
||||
host = request.host
|
||||
|
||||
|
|
Loading…
Reference in a new issue