aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/handlers/index.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-18 12:50:12 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-18 12:50:12 +0800
commit5805759c264adf96e9feea78a3cd3bfc2871b1de (patch)
treedb39479e71018ef18613b10e62af8cc816d63af0 /fg21sim/webui/handlers/index.py
parent2abadd1a0fc88b9ac16533a994353b3cb7449451 (diff)
downloadfg21sim-5805759c264adf96e9feea78a3cd3bfc2871b1de.tar.bz2
webui: Redirect to login page if not authenticated on POST request
* Remove the authentication requirement on GET operation * "main.js": Redirect to the login page if POST response 403 forbidden * "main.js": Use global AJAX events handling instead of `$.ajaxSetup()`
Diffstat (limited to 'fg21sim/webui/handlers/index.py')
-rw-r--r--fg21sim/webui/handlers/index.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/fg21sim/webui/handlers/index.py b/fg21sim/webui/handlers/index.py
index e95c310..b351619 100644
--- a/fg21sim/webui/handlers/index.py
+++ b/fg21sim/webui/handlers/index.py
@@ -2,11 +2,9 @@
# MIT license
"""
-Login handler
+Index page handler
"""
-import tornado.web
-
from .base import BaseRequestHandler
@@ -14,6 +12,5 @@ class IndexHandler(BaseRequestHandler):
"""
Index page handler of the Web UI.
"""
- @tornado.web.authenticated
def get(self):
self.render("index.html")