支持同时cookie登陆与secret硬编码鉴权两种方式

This commit is contained in:
xia-chu
2026-03-19 19:32:58 +08:00
parent e1d3c21529
commit 22dcde4bf3
4 changed files with 18 additions and 21 deletions

View File

@@ -34,12 +34,6 @@ defaultSnap=./www/logo.png
# Root directories accessible via the `downloadFile` API. Separate multiple directories with semicolons (;).
downloadRoot=./www
# 是否采用传统secret硬编码鉴权模式默认开启开启后每次http接口请求都需要传递secret
# 关闭传统鉴权模式后,需要先调用/index/api/login接口登录成功后将设置cookie在cookie有效期内访问所有接口都将放行。
# Whether to enable the legacy secret-based authentication mode (enabled by default). When enabled, every API request requires the secret.
# When disabled, users must first call `/index/api/login`. Upon success, a cookie auth token is set, allowing unrestricted access to all APIs while the cookie remains valid.
legacyAuth=1
[ffmpeg]
# FFmpeg可执行程序路径,支持相对路径/绝对路径
# Path to the FFmpeg executable. Both relative and absolute paths are supported.