perf: 优化反向代理配置

This commit is contained in:
MoeFurina
2025-08-24 23:10:07 +08:00
committed by ImFurina
parent 771777b669
commit b598978628
6 changed files with 14 additions and 7 deletions
+2 -1
View File
@@ -41,8 +41,9 @@ module.exports = async (query, request) => {
const result = await response.json();
// 代理逻辑
const useProxy = process.env.ENABLE_PROXY || false;
const proxy = process.env.PROXY_URL;
if (proxy && result.url && result.url.includes("kuwo")) {
if (useProxy && result.url && result.url.includes("kuwo")) {
result.proxyUrl = proxy + result.url.replace(/^http:\/\//, "http/");
}