You've already forked favicon-api-v3
25.09.04
This commit is contained in:
@@ -8,7 +8,7 @@ import yaml
|
||||
bind = "0.0.0.0:8000"
|
||||
|
||||
# Worker 进程数(推荐 CPU 核心数 * 2 + 1)
|
||||
workers = 4
|
||||
workers = 2
|
||||
|
||||
# 工作模式(sync、gevent、uvicorn.workers.UvicornWorker)
|
||||
worker_class = "uvicorn.workers.UvicornWorker"
|
||||
@@ -17,6 +17,9 @@ worker_class = "uvicorn.workers.UvicornWorker"
|
||||
log_dir = Path("logs")
|
||||
log_dir.mkdir(exist_ok=True)
|
||||
|
||||
# 允许来自这些IP的代理转发
|
||||
forwarded_allow_ips = "*"
|
||||
|
||||
# 日志配置
|
||||
with open(Path(__file__).with_name("logging.yaml"), "r", encoding="utf-8") as f:
|
||||
logconfig_dict = yaml.safe_load(f)
|
||||
@@ -36,10 +39,10 @@ raw_env = [
|
||||
"UVICORN_ACCESS_LOGFORMAT=%(h)s %(l)s %(u)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\" %(D)s"
|
||||
]
|
||||
|
||||
# 可选:超时时间(秒)
|
||||
# 超时时间(秒)
|
||||
timeout = 120
|
||||
|
||||
# Keep - Alive超时
|
||||
# Keep-Alive超时
|
||||
keepalive = 5
|
||||
|
||||
# 进程名(ps aux 中显示)
|
||||
|
||||
Reference in New Issue
Block a user