Files
knowledge-governance/.env.example
狐友 GXXP & Miku 8c84c9c601
build / build (push) Successful in 2m26s
fix(kb-bindings): allow key entry on private HTTP consoles
- Accept the private-console transport with an exact Origin/Host match; the http console is not a secure context, so Chrome sends no Sec-Fetch-Site and that requirement made every real write 400.
- Reject bracketed non-IPv6 host spellings, including ported forms, instead of normalising them to loopback.
- Show the plaintext-warning copy or the disabled state from a tri-state capability field; old APIs keep the legacy message.
- Document WEKNORA_ALLOW_PRIVATE_HTTP in .env.example and the operations runbook.
2026-11-24 11:22:06 +08:00

81 lines
3.9 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Optional independent source, disabled by default. Never use the app writer or
# substitute DATABASE_URL. Backend credential file must be a regular 0600 file.
DOBOTAI_OPS_READ_ENABLED=false
DOBOTAI_OPS_READ_DSN_FILE=
DOBOTAI_OPS_TENANT_KEY=
DOBOTAI_OPS_DIAL_MODE=direct
DOBOTAI_OPS_SSH_TARGET=
DOBOTAI_OPS_CONNECT_TIMEOUT=5s
DOBOTAI_OPS_QUERY_TIMEOUT=4s
DOBOTAI_OPS_MAX_CONNS=2
DOBOTAI_OPS_MIN_CONNS=0
# API and worker share this opt-in binding; no browser-selected paths/credentials.
# Runtime root is the read-only existing weekly_report directory (SDK/config and
# private secret file). Python must be compatible and already provide PyYAML.
# Container deployment requires approved runtime/script mounts; not auto-installed.
DOBOTAI_OPS_DIRECTORY_SYNC_ENABLED=false
DOBOTAI_OPS_DIRECTORY_SYNC_PYTHON=
DOBOTAI_OPS_DIRECTORY_SYNC_SCRIPT=
DOBOTAI_OPS_DIRECTORY_SYNC_RUNTIME_ROOT=
DOBOTAI_OPS_DIRECTORY_SYNC_SPOOL_ROOT=
DOBOTAI_OPS_DIRECTORY_SYNC_TIMEOUT=20m
# Independent governance AI: endpoint/model/write-only API key are stored via the admin page.
# Mount the same 32-byte regular 0600 master-key file into API and ordinary worker.
QA_AI_MASTER_KEY_FILE=
# 「知识库绑定」密钥密文的独立主密钥(32字节、0600 常规文件),挂载到 api 与 worker。
# 留空时页面仍能读旧部署的文件凭据/默认绑定,但保存新密钥会被拒绝(不落明文)。
WEKNORA_BINDING_MASTER_KEY_FILE=
# 同网段 http(生产 18093 反代)放行:只接受 RFC1918/回环/链路本地,公网 http 仍拒绝。
# 同时决定「知识库绑定」页是否允许录入新 Key(能力位来自服务端);开启后页面显示明文传输风险。
# 控制台自身经 TLS 反代提供时,仍需 QA_AI_TRUST_TLS_PROXY=true 且反代传 X-Forwarded-Proto=https。
WEKNORA_ALLOW_PRIVATE_HTTP=false
# Empty uses system DNS; alidns enables certificate-verified public DNS-over-TLS for this client only.
QA_AI_DNS_OVER_TLS=
# Only opt in behind an already trusted TLS-terminating same-origin reverse proxy.
QA_AI_TRUST_TLS_PROXY=false
APP_ADDR=:8080
DATABASE_URL=postgres://governance@postgres:5432/governance?sslmode=disable
PGPASSFILE=/run/secrets/pgpass
WORKER_ID=worker-1
WORKER_POLL_INTERVAL=1s
WORKER_LEASE_DURATION=30s
WORKER_RETRY_DELAY=5s
RELEASE_WORKER_ENABLED=false
PRODUCTION_RELEASE_REQUESTS_ENABLED=false
# Read-only probe of the production WeKnora endpoint (console shows its real
# state); the publish target itself stays in RELEASE_CONFIG_FILE.
PRODUCTION_WEKNORA_BASE_URL=
PRODUCTION_WEKNORA_API_KEY_FILE=
PRODUCTION_WEKNORA_ALLOW_DOCKER_HTTP=false
PP_SCAN_ENABLED=false
PP_SCAN_HOST_DATA_ROOT=/home/zheromiku/dobot-portal-sync/data
PP_SCAN_CONTAINER_DATA_ROOT=/home/zheromiku/dobot-portal-sync/data
TEST_WEKNORA_ENABLED=false
TEST_WEKNORA_ALLOW_DOCKER_HTTP=false
TEST_WEKNORA_BASE_URL=
MINERU_BASE_URL=
TEST_WEKNORA_KB_ID=
TEST_WEKNORA_API_KEY_FILE=/run/secrets/test_weknora_api_key
GOVERNANCE_SPOOL_ROOT=/var/lib/governance/spool
TEST_WEKNORA_HTTP_TIMEOUT=60s
TEST_WEKNORA_POLL_INITIAL=10s
TEST_WEKNORA_POLL_MAX=60s
TEST_WEKNORA_STALLED_AFTER=30m
TEST_WEKNORA_MAX_UPLOAD_BYTES=52428800
TEST_ACCEPTANCE_POLICY_VERSION=structural-v1
# 「版本记录」页:**匿名只读**远端仓库的提交与 tag(**不使用任何凭据**)。
# 留空即"未接线"(页面降级展示、同步按钮不可用)。只允许下面批准的 origin 与固定仓库,
# 不接受任何调用方传入的 URL;`VERSION_HISTORY_REPO` 必须是 owner/name。
VERSION_HISTORY_GITEA_BASE_URL=
VERSION_HISTORY_REPO=Weknora/knowledge-governance
VERSION_HISTORY_ALLOWED_ORIGINS=
# 页面上的「查看提交 / 查看 tag」链接用哪个 origin —— 抓取可以走内网,但链接必须能被
# **点它的人**打开(否则点开是空白)。留空 = 与上面的抓取地址相同。
VERSION_HISTORY_LINK_ORIGIN=https://gitea.zheromiku.top
VERSION_HISTORY_HTTP_TIMEOUT=15s
VERSION_HISTORY_MAX_PAGES=200