浏览代码

accept both GET and POST for /

Son NK 5 年之前
父节点
当前提交
0327f755a1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server.py

+ 1 - 1
server.py

@@ -195,7 +195,7 @@ def register_blueprints(app: Flask):
 
 
 def set_index_page(app):
-    @app.route("/")
+    @app.route("/", methods=["GET", "POST"])
     def index():
         if current_user.is_authenticated:
             return redirect(url_for("dashboard.index"))