fix: 整理一些长期遗留懒得修的小问题

This commit is contained in:
ikechan8370 2023-10-30 15:35:05 +08:00
parent e5959b0190
commit ea687296a5
2 changed files with 13 additions and 6 deletions

View file

@ -138,7 +138,11 @@ export default class SydneyAIClient {
agent = proxy(this.opts.proxy)
}
if (Config.sydneyWebsocketUseProxy) {
sydneyHost = Config.sydneyReverseProxy.replace('https://', 'wss://').replace('http://', 'ws://')
if (!Config.sydneyReverseProxy) {
logger.warn('用户开启了对话反代,但是没有配置反代,忽略反代配置')
} else {
sydneyHost = Config.sydneyReverseProxy.replace('https://', 'wss://').replace('http://', 'ws://')
}
}
logger.mark(`use sydney websocket host: ${sydneyHost}`)
let host = sydneyHost + '/sydney/ChatHub'