mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
fix(部署): 统一 Docker 部署 URL 安全默认值为开发友好模式
docker-compose.yml / docker-compose.local.yml 中 SECURITY_URL_ALLOWLIST_ALLOW_INSECURE_HTTP 与 SECURITY_URL_ALLOWLIST_ALLOW_PRIVATE_HOSTS 的兜底值由 false 改为 true, 与代码默认值(0c7a58fc)保持一致,避免未配置 .env 的 Docker 部署 在测试账号连接时因 http base URL 报 "invalid url scheme: http"。 同步更新 README(三语)、.env.example、config.example.yaml 中 过时的"默认拒绝 HTTP"描述,改为默认允许并指导生产环境显式收紧。
This commit is contained in:
+4
-4
@@ -359,11 +359,11 @@ DASHBOARD_AGGREGATION_RETENTION_DAILY_DAYS=730
|
||||
# 启用 URL 白名单验证(false 则跳过白名单检查,仅做基本格式校验)
|
||||
SECURITY_URL_ALLOWLIST_ENABLED=false
|
||||
|
||||
# 关闭白名单时,是否允许 http:// URL(默认 false,只允许 https://)
|
||||
# ⚠️ 警告:允许 HTTP 存在安全风险(明文传输),仅建议在开发/测试环境或可信内网中使用
|
||||
# Allow insecure HTTP URLs when allowlist is disabled (default: false, requires https)
|
||||
# 关闭白名单时,是否允许 http:// URL(默认 true,设为 false 则只允许 https://)
|
||||
# ⚠️ 警告:允许 HTTP 存在安全风险(明文传输),生产环境建议设为 false
|
||||
# Allow insecure HTTP URLs when allowlist is disabled (default: true; set to false to require https)
|
||||
# ⚠️ WARNING: Allowing HTTP has security risks (plaintext transmission)
|
||||
# Only recommended for dev/test environments or trusted networks
|
||||
# Recommended to set false in production
|
||||
SECURITY_URL_ALLOWLIST_ALLOW_INSECURE_HTTP=true
|
||||
|
||||
# 是否允许本地/私有 IP 地址用于上游/定价/CRS(仅在可信网络中使用)
|
||||
|
||||
Reference in New Issue
Block a user