Update app.py

This commit is contained in:
Alex
2023-10-06 13:54:03 +01:00
parent cd79330c4c
commit b3a0368b95

View File

@@ -27,7 +27,10 @@ celery.config_from_object("application.celeryconfig")
@app.route("/")
def home():
return redirect('http://localhost:5173') if request.remote_addr in ('0.0.0.0', '127.0.0.1', 'localhost', '172.18.0.1') else 'Welcome to DocsGPT Backend!'
if request.remote_addr in ('0.0.0.0', '127.0.0.1', 'localhost', '172.18.0.1'):
return redirect('http://localhost:5173')
else:
return 'Welcome to DocsGPT Backend!'
@app.after_request
def after_request(response):