feat: var for active server

This commit is contained in:
chaoszhu
2026-08-06 21:19:52 +08:00
parent 08fa313de7
commit 2214f64121
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -1,6 +1,13 @@
const plusServers = [
const defaultPlusServers = [
'https://easynode-auth1.chaoszhu.com',
'https://easynode-auth2.chaoszhu.com'
]
const envPlusServers = process.env.PLUS_AUTH_SERVERS
?.split(',')
.map(server => server.trim())
.filter(Boolean)
const plusServers = envPlusServers?.length ? envPlusServers : defaultPlusServers
export { plusServers }
+1 -1
View File
@@ -391,7 +391,7 @@ async function requestWithFailover(path, options = {}, timeout = 5000) {
method,
headers,
body,
timeout
signal: AbortSignal.timeout(timeout)
})
// 200+