Allow CPA_AUTO_IMPORT_REMOTE from .env

Enable remote CPA import via env flag with priority over config.json, and load project .env when resolving remote settings.
This commit is contained in:
chaos committed 2026-07-11 18:06:17 +08:00
1 parent 0d8265de03
commit 06044551c7
4 files changed
+66 -9

No files matched your search

+1 -1
View File
@@ -131,7 +131,7 @@
"cpa_copy_to_hotload": false,
"// cpa_hotload_dir": "CPA 容器/进程挂载的 auth-dir(copy_to_hotload=true 时生效)",
"cpa_hotload_dir": "",
"// cpa_auto_import_remote": "写出 xai-*.json 后是否自动 POST 到 CPA Management API 导入",
"// cpa_auto_import_remote": "写出 xai-*.json 后是否自动 POST 到 CPA Management API 导入。也可在 .env 用 CPA_AUTO_IMPORT_REMOTE=1/0(env 优先)",
"cpa_auto_import_remote": false,
"// cpa_remote_base": "CPA 根地址,只填到端口即可,如 http://127.0.0.1:8317(程序自动拼 /v0/management/auth-files)",
"cpa_remote_base": "",