feat:修改签名host
This commit is contained in:
@@ -227,21 +227,21 @@ export async function generateSign(config, udid, timestamp) {
|
||||
const method = config.method?.toUpperCase() || 'GET';
|
||||
|
||||
// 获取host(从baseURL或当前域名) 本地启动要求host为xsynergy.gxtech.ltd
|
||||
let host = 'xsynergy.gxtech.ltd';
|
||||
// let host = '';
|
||||
// // console.log('请求配置:', config.baseURL)
|
||||
// if (config.baseURL) {
|
||||
// try {
|
||||
// const urlObj = new URL(config.baseURL);
|
||||
// // console.log('解析baseURL成功:', urlObj);
|
||||
// host = urlObj.host;
|
||||
// } catch (e) {
|
||||
// // console.log('解析baseURL失败,使用window.location.host:', window.location);
|
||||
// host = window.location.host;
|
||||
// }
|
||||
// } else {
|
||||
// host = window.location.host;
|
||||
// }
|
||||
// let host = 'xsynergy.gxtech.ltd';
|
||||
let host = '';
|
||||
// console.log('请求配置:', config.baseURL)
|
||||
if (config.baseURL) {
|
||||
try {
|
||||
const urlObj = new URL(config.baseURL);
|
||||
// console.log('解析baseURL成功:', urlObj);
|
||||
host = urlObj.host;
|
||||
} catch (e) {
|
||||
// console.log('解析baseURL失败,使用window.location.host:', window.location);
|
||||
host = window.location.host;
|
||||
}
|
||||
} else {
|
||||
host = window.location.host;
|
||||
}
|
||||
|
||||
// console.log('请求host:', host);
|
||||
|
||||
|
||||
BIN
xSynergy-manage.zip
Normal file
BIN
xSynergy-manage.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user