diff --git a/src/main.py b/src/main.py index 7a7c34b..d0f7868 100644 --- a/src/main.py +++ b/src/main.py @@ -265,17 +265,17 @@ async def list_projects_compat(): # --------------------------------------------------------------------------- -# 靜態文件服務(前端 dist/,F18 實現) +# 静态文件服务(前端 dist/,F18 实现) # --------------------------------------------------------------------------- DIST_DIR = Path(__file__).parent / "frontend" / "dist" if DIST_DIR.exists(): - # v3.1: 緩存策略 - HTML 不緩存(確保新版本生效),JS/CSS 長緩存(Vite content hash 已處理) + # v3.1: 缓存策略 - HTML 不缓存(确保新版本生效),JS/CSS 长缓存(Vite content hash 已处理) import mimetypes _static_app = StaticFiles(directory=str(DIST_DIR), html=True) class CachedStaticFiles: - """包裝 StaticFiles,添加 Cache-Control 頭""" + """包装 StaticFiles,添加 Cache-Control 头""" def __init__(self, app): self._app = app