From efcba2cef9a9e54b4d1e816a879fc0d678556a50 Mon Sep 17 00:00:00 2001 From: Pine Date: Sat, 29 Aug 2026 00:31:34 +0800 Subject: [PATCH] =?UTF-8?q?chore(env):=20=E5=86=85=E9=83=A8=E4=BB=A4?= =?UTF-8?q?=E7=89=8C=E9=85=8D=E7=BD=AE=E6=A0=B7=E4=BE=8B=E4=B8=8E=20compos?= =?UTF-8?q?e=20=E9=80=8F=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 ++ docker-compose.dev.yml | 1 + docker-compose.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/.env.example b/.env.example index 3b8a2a5..5774325 100644 --- a/.env.example +++ b/.env.example @@ -77,6 +77,8 @@ # 会话密钥 # SESSION_SECRET=random_string +# 云超服内部管理令牌:server-core 作为唯一入口无权限限制地管理微服务;置空关闭该能力(须与 server-core 的 PINEAGENTS_INTERNAL_TOKEN 一致) +# PINEAGENTS_INTERNAL_TOKEN= # false/未配置:本地 HTTP 模式,关闭 refresh/logout OriginGuard,且不得设置 TRUSTED_URL;兼容本地开发代理。 # true:启用 Secure Refresh Cookie 和严格 OriginGuard,必须同时列出全部可信 HTTPS Origin。 # SESSION_COOKIE_TRUSTED_URL 多项用英文逗号分隔;不支持通配符、路径或域名后缀匹配。 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 6438b0c..3f655ed 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -31,6 +31,7 @@ services: - REDIS_CONN_STRING=redis://redis - TZ=Asia/Shanghai - BATCH_UPDATE_ENABLED=true + - PINEAGENTS_INTERNAL_TOKEN=${PINEAGENTS_INTERNAL_TOKEN:-} # 云超服内部管理令牌:server-core 无权限限制管理;置空关闭 # Local HTTP dev mode: keep Secure=false and leave TRUSTED_URL unset. This disables the refresh/logout OriginGuard so the :5173 -> :3000 dev proxy works. - SESSION_COOKIE_SECURE=false # For HTTPS only: set Secure=true and list every exact trusted HTTPS browser Origin. This does not configure relay CORS. diff --git a/docker-compose.yml b/docker-compose.yml index 8e6fe4b..8c09bb8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,6 +36,7 @@ services: - ERROR_LOG_ENABLED=true # 是否启用错误日志记录 (Whether to enable error log recording) - BATCH_UPDATE_ENABLED=true # 是否启用批量更新 (Whether to enable batch update) - NODE_NAME=new-api-node-1 # 节点名称,用于审计日志中标识节点身份;多节点/容器部署时建议设置 (Node name used in audit logs; recommended when running multiple instances or in containers) + - PINEAGENTS_INTERNAL_TOKEN=${PINEAGENTS_INTERNAL_TOKEN:-} # 云超服内部管理令牌:server-core 作为唯一入口无权限限制地管理微服务;置空则关闭此能力 (Trusted internal token; empty disables it) # - STREAMING_TIMEOUT=300 # 流模式无响应超时时间,单位秒,默认120秒,如果出现空补全可以尝试改为更大值 (Streaming timeout in seconds, default is 120s. Increase if experiencing empty completions) # - RELAY_IDLE_CONN_TIMEOUT=90 # Relay HTTP 客户端空闲连接超时时间,单位秒,默认跟随 Go 标准库,设置为0表示不限制 (Relay HTTP client idle keep-alive timeout in seconds, defaults to Go standard library; set 0 to disable) # - SESSION_SECRET=random_string # 多机部署时设置,必须修改这个随机字符串!! (multi-node deployment, set this to a random string!!!!!!!)