Update app.ts to enforce HTTPS for base URL

This commit is contained in:
2026-02-04 21:08:01 +08:00
parent 32cdaf44cc
commit 6938c911c3

View File

@@ -39,7 +39,7 @@ App<IAppOption>({
if (gameServerHttp) { if (gameServerHttp) {
console.log('远程配置获取成功:', gameServerHttp); console.log('远程配置获取成功:', gameServerHttp);
// 确保 URL 包含协议头 // 确保 URL 包含协议头
const finalUrl = gameServerHttp.startsWith('http') ? gameServerHttp : `http://${gameServerHttp}`; const finalUrl = gameServerHttp.startsWith('https') ? gameServerHttp : `https://${gameServerHttp}`;
// 更新全局配置 // 更新全局配置
config.updateBaseUrl(finalUrl); config.updateBaseUrl(finalUrl);