Files
awoooi/apps/web/.env.example
Your Name d0591c54b0
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 35s
fix(security): 體健修復 — 7項 Critical/Major 安全問題全修
## Critical 修復 (C1-C5)
- C1: git rm --cached 03-secrets.yaml(CHANGE_ME 模板不再追蹤)
- C2: git rm --cached awoooi.db + .gitignore 加 *.db(SQLite HARD_RULES 違規)
- C3: sentry-tunnel SENTRY_HOST 改為 process.env fallback
- C4: config.py DATABASE_URL 移除 changeme default,改為必填
- C5: run_migration.py 改為 os.environ["DATABASE_URL"]

## Major 修復 (M1-M4)
- M1: auto_repair /execute 加 CSRF 保護 + AutoRepairPanel.tsx 同步
- M2: drift /rollback /adopt 加 CSRF 保護(/internal/scan 保持無 CSRF)
- M3: terminal /intent 加 CSRF 保護 + terminal.store.ts 同步
- M4: live-dashboard HOST_IPS + host-grid VIP 改為 env var

## 其他
- 新增 apps/web/.env.example(6 個 env var 說明)
- K8s deployment-web 補入 3 個新 env var
- 整合測試:新增 aider_event_repository + ai_router_feedback 真實 DB 測試
- test_terminal.py CSRF dependency override 修復

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 01:27:39 +08:00

36 lines
1.5 KiB
Plaintext
Raw 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.
# =============================================================================
# apps/web — Environment Variables
# 複製此檔案為 .env.local 並填入實際值
# 生成日期: 2026-04-22 Claude Code
# =============================================================================
# ----------------------------------------------------------------------------
# 必填 (REQUIRED)
# ----------------------------------------------------------------------------
# API 後端 URLNext.js build-time 寫入 JS bundle禁止使用內網 IP
NEXT_PUBLIC_API_URL=http://192.168.0.188:32334
# ----------------------------------------------------------------------------
# 可選 (OPTIONAL)
# ----------------------------------------------------------------------------
# 是否啟用 Demo 模式true/false
NEXT_PUBLIC_ENABLE_DEMO=false
# SignOz 可觀測性平台 URL
NEXT_PUBLIC_SIGNOZ_URL=http://192.168.0.110:3301
# 主機 IP 列表逗號分隔live-dashboard 用於 fallback 顯示)
NEXT_PUBLIC_HOST_IPS=192.168.0.110,192.168.0.112,192.168.0.120,192.168.0.188
# K8s Cluster VIP 資訊字串host-grid 顯示用)
NEXT_PUBLIC_K8S_VIP_INFO=VIP 192.168.0.125 · kubectl :6443 · Web :32335 · API :32334
# ----------------------------------------------------------------------------
# Server-side Only不含 NEXT_PUBLIC_ 前綴,不會暴露在 JS bundle
# ----------------------------------------------------------------------------
# Sentry 自建主機 URLsentry-tunnel route handler 使用)
SENTRY_HOST=http://192.168.0.110:9000