aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/main.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/main.py b/backend/main.py
index 085599c..76aca81 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -77,7 +77,11 @@ def route(path, env, session, post):
if not session:
return home()
- print(json.dumps(session))
+ #print(json.dumps(session))
+
+ # Redirect if no slash after alias
+ if len(path) == 1:
+ return ["", [('Content-Type','text/html'), ("Location", path[0] + "/")], "302 Redirect"]
if len(path) > 1 and path[1] == "upload":
return upload(session, post)