fix: Allow SLDs to show nic page
All checks were successful
Build Docker / Build Image (push) Successful in 24s

This commit is contained in:
2024-02-22 14:25:15 +11:00
parent fa6dd6ef14
commit 64abeeb29e

View File

@@ -378,11 +378,10 @@ def index():
year = datetime.datetime.now().year
hns_scripts = '<script src="https://gday.hnsau/handshake.js" domain="gday.hnsau" async></script><script src="https://gday.hnsau/https.js" async></script>'
if not request.host in tlds and 'localhost' not in request.host:
return render_template('index.html',year=year, handshake_scripts=hns_scripts)
tld = request.host.split('.')[-1]
print(tld)
if tld not in tlds and 'localhost' not in tld:
return render_template('index.html',year=year, handshake_scripts=hns_scripts)
if 'localhost' in tld:
tld = tlds[0]
hns_scripts = '<script src="https://gday.hnsau/https.js" async></script>'