feat(seed): 支持从远程URL加载seed.txt并添加认证配置
新增环境变量配置支持从远程Gitea等URL加载seed.txt文件,包括: - SEED_SOURCE: 指定来源(file/url) - SEED_URL: 远程文件地址 - SEED_AUTH_HEADER/SEED_TOKEN: 认证配置 添加远程加载失败时自动回退到本地文件的功能 更新README文档说明配置方法
This commit is contained in:
17
.env.example
Normal file
17
.env.example
Normal file
@@ -0,0 +1,17 @@
|
||||
# 服务器端口
|
||||
PORT=3000
|
||||
|
||||
# Seed 来源:file 或 url
|
||||
SEED_SOURCE=file
|
||||
|
||||
# 当 SEED_SOURCE=url 时,配置远程原始TXT地址
|
||||
# 示例:Gitea Raw 文件直链或 API Raw 接口
|
||||
# SEED_URL=https://gitea.example.com/<owner>/<repo>/raw/seed.txt
|
||||
SEED_URL=
|
||||
|
||||
# 认证(任选其一)
|
||||
# 1) 自定义 Authorization 头(例如 Bearer 或 Basic)
|
||||
# SEED_AUTH_HEADER=Bearer xxxxx
|
||||
SEED_AUTH_HEADER=
|
||||
# 2) Token 形式(将自动使用 Authorization: token <TOKEN>)
|
||||
SEED_TOKEN=
|
||||
Reference in New Issue
Block a user