pull/632/head
Mr Chen 5 months ago
parent 5b92f109b9
commit 34b435ffca
  1. 1
      web/admin/__init__.py
  2. 2
      web/core/mw.py

@ -130,6 +130,7 @@ def requestAfter(response):
@app.errorhandler(404) @app.errorhandler(404)
def page_unauthorized(error): def page_unauthorized(error):
from flask import redirect
return redirect('/', code=302) return redirect('/', code=302)
# return render_template_string('404 not found', error_info=error), 404 # return render_template_string('404 not found', error_info=error), 404

@ -483,7 +483,7 @@ def checkDomainPanel():
return redirect(to, code=302) return redirect(to, code=302)
return False return False
else: else:
print(current_host.strip().lower(), domain.strip().lower()) # print(current_host.strip().lower(), domain.strip().lower())
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)

Loading…
Cancel
Save