From 6da73da8d77cc56b13dbaa01f81c7ff4b9427c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B9=E5=B0=BC=E5=B0=94?= Date: Wed, 11 Mar 2026 12:21:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 3 + backend/main.py | 6 +- public/index.html | 216 ++++++++++++++++++++++++++++++++++------------ run-dev.sh | 2 +- src/server.ts | 8 +- start.sh | 2 +- 6 files changed, 177 insertions(+), 60 deletions(-) diff --git a/.env.example b/.env.example index 64892ff..5c1dd0b 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,7 @@ PORT=3000 +# Node 代理 /api、/auth 时转发的后端地址(单容器部署可不设,默认 127.0.0.1:8000) +# BACKEND_PORT=8000 +# BACKEND_HOST=127.0.0.1 WECHAT_UPSTREAM_BASE_URL=http://113.44.162.180:7006 CHECK_STATUS_BASE_URL=http://113.44.162.180:7006 # 第三方滑块(7765):iframe 加载自带预填表单页,提交到下方地址 diff --git a/backend/main.py b/backend/main.py index 91a3214..ab52e00 100644 --- a/backend/main.py +++ b/backend/main.py @@ -488,7 +488,11 @@ async def slider_asset_proxy(path: str): if resp.status_code >= 400: raise HTTPException(status_code=resp.status_code, detail=resp.text[:200]) media_type = "application/javascript" if path.endswith(".js") else "application/octet-stream" - return Response(content=resp.content, media_type=media_type) + return Response( + content=resp.content, + media_type=media_type, + headers={"Cache-Control": "no-store, no-cache, must-revalidate", "Pragma": "no-cache"}, + ) except HTTPException: raise except Exception as e: diff --git a/public/index.html b/public/index.html index d4bec58..56443aa 100644 --- a/public/index.html +++ b/public/index.html @@ -596,36 +596,53 @@ @@ -634,15 +651,78 @@