Update mw.py

pull/632/head
Mr Chen 5 months ago
parent 51d092ca19
commit dfef78fc84
  1. 20
      web/core/mw.py

@ -463,16 +463,16 @@ def checkDomainPanel():
if client_ip in ['127.0.0.1', 'localhost', '::1']: if client_ip in ['127.0.0.1', 'localhost', '::1']:
return False return False
# ip = getHostAddr() ip = getHostAddr()
# if domain == '': if domain == '':
# 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)
# return False return False
# else: else:
# if current_host.strip().lower() != domain.strip().lower(): if current_host.strip().lower() != domain.strip().lower():
# to = scheme + "://" + domain + ":" + str(port) to = scheme + "://" + domain + ":" + str(port)
# return redirect(to, code=302) return redirect(to, code=302)
return False return False
def getLocalIp(): def getLocalIp():

Loading…
Cancel
Save