fix(tts): api key leak in logs
Build and Push Image / build-backend (push) Successful in 2m29s
Build and Push Image / build-frontend (push) Successful in 3m38s
Build and Push Image / push (push) Successful in 1m12s

This commit is contained in:
2026-07-12 23:09:09 +07:00 Unverified
parent ab9f6c11af
commit 4b9d05f253
+2 -2
View File
@@ -61,7 +61,7 @@ export async function GET(request: Request) {
) {
const [apiKey, model] = POSSIBLE_CHOICES[currentRotation].split(":");
console.log(
`[TTS] Trying key ${apiKey.slice(0, 8)}:${model} (${currentRotation}/${POSSIBLE_CHOICES} #${i + 1})...`,
`[TTS] Trying key ${apiKey.slice(0, 8)}:${model} (${currentRotation}/${POSSIBLE_CHOICES.length} #${i + 1})...`,
);
const client = new GoogleGenAI({ apiKey });
@@ -87,7 +87,7 @@ export async function GET(request: Request) {
console.error(`TTS API key failed: ${apiKey.slice(0, 8)}...`, e);
}
}
console.log("[TTS] Got response?", audioData);
console.log("[TTS] Got response?", audioData ? "yes" : "no");
if (!audioData)
return Response.json({ error: "Response is empty" }, { status: 500 });