import { getQuery } from '../../utils/web/index';
const query = getQuery();
export const isGlobalSite = window.location.hostname === 'connect.tencentcloud.com' || query.globalSite;
export const apiBaseUrl = (() => {
  if (window.location.host.endsWith('tencentcloud.com') || isGlobalSite) {
    return 'https://api.connect.tencentcloud.com';
  }
  if (window.location.host.endsWith('tencent.com.cn')) {
    return 'https://api.ccc.cloud.tencent.com.cn';
  }
  if (window.location.host.endsWith('tencent.cn')) {
    return 'https://api.ccc.cloud.tencent.cn';
  }

  return "https://test.ccclogic.pstn.avc.qcloud.com" ?? 'https://api.tccc.qcloud.com';
})();


