kin: BATON-FIX-016 [TECH DEBT] VAPID public key жёстко вшит как пустая строка в <meta>-тег — требует ручного заполнения при деплое

This commit is contained in:
Gros Frumos 2026-03-21 12:23:05 +02:00
parent 5fe9a603f8
commit 8c4c46ee92
3 changed files with 173 additions and 0 deletions

View file

@ -132,6 +132,11 @@ async def health() -> dict[str, Any]:
return {"status": "ok"}
@app.get("/api/vapid-public-key")
async def vapid_public_key() -> dict[str, str]:
return {"vapid_public_key": config.VAPID_PUBLIC_KEY}
@app.post("/api/register", response_model=RegisterResponse)
async def register(body: RegisterRequest, _: None = Depends(rate_limit_register)) -> RegisterResponse:
api_key = secrets.token_hex(32)