Revert "fix: remove hardcoded windows proxy fallback that causes 500 error when proxy is unavailable"

This reverts commit 62ecf5642b.
This commit is contained in:
2026-08-01 16:00:00 +08:00
parent 62ecf5642b
commit 52ecdc8a16
+3 -3
View File
@@ -2473,9 +2473,9 @@ app.post('/api/tts/generate', express.json(), async (req, res) => {
try {
let proxyUrl = process.env.HTTP_PROXY || process.env.http_proxy || process.env.HTTPS_PROXY || process.env.https_proxy || process.env.ALL_PROXY || process.env.all_proxy;
// Remove the forced win32 proxy logic so it won't crash when running on Windows without a proxy
if (!proxyUrl && os.platform() === 'win32') {
proxyUrl = 'http://127.0.0.1:7890';
}
console.log(`[TTS] Sending request for text: "${text}" with model "${model}"${proxyUrl ? ` via proxy: ${proxyUrl}` : ''}`);
const requestBody = JSON.stringify({