Update mw.py

pull/632/head
Mr Chen 5 months ago
parent 852fc6e5a7
commit ee206f014d
  1. 2
      web/core/mw.py

@ -466,6 +466,8 @@ def checkDomainPanel():
ip = getHostAddr() ip = getHostAddr()
if domain == '': if domain == '':
print(current_host.strip().lower(), ip.strip().lower()) print(current_host.strip().lower(), ip.strip().lower())
if ip in ['127.0.0.1', 'localhost', '::1']:
return False
if current_host.strip().lower() != ip.strip().lower(): if current_host.strip().lower() != ip.strip().lower():
to = scheme + "://" + ip + ":" + str(port) to = scheme + "://" + ip + ":" + str(port)
return redirect(to, code=302) return redirect(to, code=302)

Loading…
Cancel
Save