diff --git a/.idea/workspace.xml b/.idea/workspace.xml index beb90ec..ae136e9 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,13 +3,9 @@ - - - - - + @@ -157,7 +157,6 @@ @@ -218,10 +218,10 @@ - @@ -503,7 +503,14 @@ @@ -516,9 +523,9 @@ - + - + @@ -530,13 +537,13 @@ - + - + - + @@ -726,13 +733,6 @@ - - - - - - - @@ -774,13 +774,6 @@ - - - - - - - @@ -788,16 +781,6 @@ - - - - - - - - - - @@ -815,13 +798,6 @@ - - - - - - - @@ -831,10 +807,45 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mina b/mina index a263c74..e4845b7 160000 --- a/mina +++ b/mina @@ -1 +1 @@ -Subproject commit a263c7422a7e7a3bbf035a11c1763eef3340b89d +Subproject commit e4845b73baabd480ca5a1bc78684180b96ba6e4c diff --git a/web/interceptors/AuthInterceptor.py b/web/interceptors/AuthInterceptor.py index 39ef1c9..61af630 100644 --- a/web/interceptors/AuthInterceptor.py +++ b/web/interceptors/AuthInterceptor.py @@ -14,11 +14,15 @@ def before_request(): ignore_check_login_urls = app.config['IGNORE_CHECK_LOGIN_URLS'] path = request.path + # 如果是静态文件就不要查询用户信息了 pattern = re.compile('%s' % "|".join(ignore_check_login_urls)) if pattern.match(path): return + if '/api' in path: + return + user_info = check_login() g.current_user=None if user_info: diff --git a/www.py b/www.py index cce2ec6..25c0871 100644 --- a/www.py +++ b/www.py @@ -4,8 +4,8 @@ from application import app ''' 统一拦截处理和统一错误处理 ''' -# from web.interceptors.AuthInterceptor import * -# from web.interceptors.ApiAuthInterceptor import * +from web.interceptors.AuthInterceptor import * +from web.interceptors.ApiAuthInterceptor import * from web.interceptors.ErrorInterceptor import * '''