From 0907ea77c1ac9b3605229b4cab57657253d757ce Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 23 Dec 2021 16:02:54 +0200 Subject: [PATCH] fsdsdf --- files/__main__.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/files/__main__.py b/files/__main__.py index 4a225db61..4a1cc76c0 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -123,4 +123,16 @@ def after_request(response): return response -from files.routes import * +@app.route("/", subdomain="www") +@app.route("/", subdomain="old") +def sub_redirect(path): + return redirect(f"https://{app.config['SERVER_NAME']}/{path}") + + +@app.route("/", subdomain="www") +@app.route("/", subdomain="old") +def sub_redirect2(): + return redirect(f"https://{app.config['SERVER_NAME']}/") + + +from files.routes import * \ No newline at end of file