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