fix: cache headers and frontend pro tier resolution
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m34s

This commit is contained in:
2026-05-17 20:06:26 +02:00
parent 590d4347f7
commit e41dca6fe3
3 changed files with 7 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ export function useTranslationConfig(hasFile: boolean): UseTranslationConfigRetu
if (userStr) {
try {
const user = JSON.parse(userStr);
if (user?.plan || user?.tier) { setIsPro(isProTier(user)); return; }
if (user?.plan || user?.tier) { setIsPro(isProTier(user)); }
} catch { /* continue */ }
}
try {

View File

@@ -718,6 +718,7 @@ async def refresh_v1(request: Request):
async def get_me_v1(user=Depends(require_user)):
return JSONResponse(
status_code=200,
headers={"Cache-Control": "no-cache, no-store, must-revalidate"},
content={"data": user_to_response(user).model_dump(mode="json"), "meta": {}},
)

View File

@@ -225,7 +225,11 @@ async def get_available_providers():
"model": model,
})
return {"providers": available}
return JSONResponse(
status_code=200,
headers={"Cache-Control": "no-cache, no-store, must-revalidate"},
content={"providers": available}
)
@router.get("/languages")