mirror of
https://github.com/chaos-zhu/easynode.git
synced 2026-10-06 14:23:19 +08:00
feat: var for active server
This commit is contained in:
@@ -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 }
|
||||
|
||||
@@ -391,7 +391,7 @@ async function requestWithFailover(path, options = {}, timeout = 5000) {
|
||||
method,
|
||||
headers,
|
||||
body,
|
||||
timeout
|
||||
signal: AbortSignal.timeout(timeout)
|
||||
})
|
||||
|
||||
// 200+
|
||||
|
||||
Reference in New Issue
Block a user