From 1440767c69812e58c38e07df30c075e57ce4561a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 10 Mar 2026 16:43:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8E=E7=AB=AF=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/config/settings.py | 2 ++ frontend/.env.production | 1 + 2 files changed, 3 insertions(+) create mode 100644 frontend/.env.production diff --git a/backend/config/settings.py b/backend/config/settings.py index 38c1ea3..874aff9 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -163,4 +163,6 @@ CORS_ALLOWED_ORIGINS = [ "http://127.0.0.1:5173", ] +# 开发阶段可放开跨域,如需严格控制生产环境请关闭此项 +CORS_ALLOW_ALL_ORIGINS = True CORS_ALLOW_CREDENTIALS = True diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..15a08c3 --- /dev/null +++ b/frontend/.env.production @@ -0,0 +1 @@ +VITE_API_BASE_URL=https://api.example.com/api