|
@@ -8,7 +8,6 @@ from model.common import errors
|
|
|
import time
|
|
|
import base64
|
|
|
import pandas as pd
|
|
|
-from config.config import auth,port
|
|
|
log = logger()
|
|
|
from model.DateUtils import DateUtils
|
|
|
|
|
@@ -18,9 +17,7 @@ class BaseHandler(RequestHandler,DateUtils):
|
|
|
self._status_code = 200
|
|
|
self.executor = ThreadPoolExecutor(200)
|
|
|
self.set_default_headers()
|
|
|
- self._au = True
|
|
|
- if auth:
|
|
|
- self._au = self._auth()
|
|
|
+ self._au = self.get_auth() if self.settings.get('auth') else True
|
|
|
|
|
|
def options(self):
|
|
|
# 返回方法1
|
|
@@ -99,7 +96,7 @@ class BaseHandler(RequestHandler,DateUtils):
|
|
|
# return True if ur.r.get(key) else False
|
|
|
return True
|
|
|
|
|
|
- def _auth(self):
|
|
|
+ def get_auth(self):
|
|
|
# 不需要验证的请求
|
|
|
authless = ['/api/get_yangguang_data', '/api/git_hook/data_center', '/api/git_hook/qc_web']
|
|
|
url = self.request.full_url().split(str(port)+'/')[1]
|