feat: support standalone Docker runtime and internal CMS API

This commit is contained in:
2026-11-03 19:21:59 +08:00
parent 43edc632a5
commit d5c0aa7562
6 changed files with 99 additions and 4 deletions
+4 -1
View File
@@ -3,7 +3,10 @@
* 详见 documents/设计方案分析与完善版.md §2.7 Headless API 设计规范。
*/
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";
const PUBLIC_API_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000";
const API_BASE_URL = typeof window === "undefined"
? process.env.API_INTERNAL_URL || PUBLIC_API_URL
: PUBLIC_API_URL;
export class ApiError extends Error {
constructor(