ops-api/settings/common.py

27 lines
654 B
Python
Raw Normal View History

2021-12-16 19:40:59 +08:00
import os.path
from common.conf import load_yaml
# 项目目录
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
CONFIG_FILE = os.path.join(os.path.dirname(BASE_DIR), "conf.yaml")
CONFIG: dict = load_yaml(CONFIG_FILE, raise_exception=True, default={})
VERSION = "v1"
INSTANCE = "9e5da0b3-565f-11ec-b095-18c04d9eb245"
# API static token 允许请求的静态token
X_TOKEN_SET = (
"51ab21fa323a11eca1af000c2993d583", #
)
# 跨服spid集合
CROSS_SPID_SET = (
"000", "111", "222", "333", "444"
)
# session 从请求头中获取ops1 中的命名如:
# jiggry:1:chenzuoqing:089dbbae5bec11ec97c3525400e547a1
SESSION_PREFIX = "jiggry:1"