From eaefc318a61bef306c5fb6123ada11837fb6fbaa Mon Sep 17 00:00:00 2001 From: ZhangYonghao <837684951@qq.com> Date: Sat, 21 Mar 2026 20:42:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- backend/.env | 4 ++-- backend/.env.example | 4 ++-- frontend/.env.production | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 frontend/.env.production diff --git a/README.md b/README.md index 6bb97d7..d3157e3 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ NEXT_PUBLIC_API_BASE_URL=http://localhost:8000 | `APP_NAME` | string | `HTML Knowledge API` | 服务名称 | | `API_PREFIX` | string | `/api` | 接口前缀 | | `PUBLIC_BASE_URL` | string | `http://localhost:8000` | 对外可访问的服务域名 | -| `ALLOWED_ORIGINS` | JSON array / string | `["http://localhost:3000"]` | CORS 白名单 | +| `ALLOWED_ORIGINS` | JSON array / string | `["*"]` | CORS 白名单 | | `HTML_STORAGE_DIR` | string | `./data/generated_html` | HTML 文件存储目录 | | `DEFAULT_RETENTION_DAYS` | integer | `7` | 默认保留天数 | | `MAX_RETENTION_DAYS` | integer | `30` | 最大允许保留天数 | diff --git a/backend/.env b/backend/.env index 4b4df0b..4424c19 100644 --- a/backend/.env +++ b/backend/.env @@ -1,7 +1,7 @@ APP_NAME="HTML Knowledge API" API_PREFIX="/api" -PUBLIC_BASE_URL="http://localhost:8000" -ALLOWED_ORIGINS=["http://localhost:3000"] +PUBLIC_BASE_URL="http://localhost:8009" +ALLOWED_ORIGINS=["*"] HTML_STORAGE_DIR="./data/generated_html" DEFAULT_RETENTION_DAYS=7 MAX_RETENTION_DAYS=30 diff --git a/backend/.env.example b/backend/.env.example index 4b4df0b..4424c19 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,7 +1,7 @@ APP_NAME="HTML Knowledge API" API_PREFIX="/api" -PUBLIC_BASE_URL="http://localhost:8000" -ALLOWED_ORIGINS=["http://localhost:3000"] +PUBLIC_BASE_URL="http://localhost:8009" +ALLOWED_ORIGINS=["*"] HTML_STORAGE_DIR="./data/generated_html" DEFAULT_RETENTION_DAYS=7 MAX_RETENTION_DAYS=30 diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..4ea6064 --- /dev/null +++ b/frontend/.env.production @@ -0,0 +1 @@ +NEXT_PUBLIC_API_BASE_URL=http://180.76.245.69:8009