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 @@