✨ feat: 整合 2.8.5 后端存储、安全与运行优化

* 禁用 OSS 非必需校验尾部,改用精确会话前缀逐对象清理
* 保护上传终态与分享事务,清理失败保留会话并支持安全重试
* 统一下载响应头,兼容旧下载器并防止文件名注入
* 限流改用单调时钟并限制 IP 记录,缓存模板与静态资源策略
* 统一 ORM 初始化与异常处理,新增查询索引及 SQLite 性能参数
* 固定 uvloop/httptools,统一 Docker keep-alive 与内存回收配置
* 同步版本与升级文档,补充 OSS、清理、缓存及数据库回归验证
This commit is contained in:
orion committed 2026-10-29 16:37:14 +08:00
1 parent b2a9aeddb3
commit 41519afb6a
29 files changed
+1033 -132

No files matched your search

+3
View File
@@ -28,3 +28,6 @@ COPY scripts ./scripts
RUN pip install --no-cache-dir -r requirements.txt
COPY --from=frontend /build/dist ./themes/2026
ENV APP_VERSION="${APP_VERSION}"
ENV TIMEOUT_KEEP_ALIVE=5 MALLOC_TRIM_THRESHOLD_=65536
CMD ["sh", "-c", "access_log_arg=--no-access-log; if [ \"${APP_ENV:-development}\" != \"production\" ] || [ \"${ACCESS_LOG:-false}\" = \"true\" ]; then access_log_arg=--access-log; fi; exec uvicorn main:app --host \"$HOST\" --port \"$PORT\" --workers \"$WORKERS\" --log-level \"$LOG_LEVEL\" \"$access_log_arg\" --timeout-keep-alive \"${TIMEOUT_KEEP_ALIVE:-5}\" --proxy-headers --forwarded-allow-ips \"${FORWARDED_ALLOW_IPS:-}\""]