Files
signser/config.py
tursom d5a5bf4caa feat: 完善签名服务配置和自动启动功能
- 修复config.py中auth配置读取路径问题
- 在main.py中添加uvicorn自动启动功能
- 禁用FastAPI文档页面增强安全性
- 使服务器端口和监听地址可配置
- 添加完整的配置验证和测试
2025-11-14 19:18:45 +08:00

14 lines
316 B
Python

import tomllib
with open("config.toml", "rb") as f:
config = tomllib.load(f)
app_id = config["appId"]
key = config["key"]
secret = config["secret"]
avaliable_secrets = set(config["auth"]["avaliableSecrets"])
# Server configuration
server_host = config["server"]["host"]
server_port = config["server"]["port"]