瀏覽代碼

现在部署上去

liuchengsen 1 月之前
父節點
當前提交
a377712ebf
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      static/index.html

+ 2 - 5
static/index.html

@@ -116,11 +116,8 @@ body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei
 // ============================================================
 // API 配置 —— 自动检测同主机 9000 端口
 // ============================================================
-var API_BASE = (function(){
-  var h = window.location.hostname;
-  if (h === 'localhost' || h === '127.0.0.1') return 'http://localhost:9000';
-  return window.location.protocol + '//' + h + ':9000';
-})();
+// 走 nginx 反向代理,无需暴露 9000 端口
+var API_BASE = '';
 var TOKEN = null;
 
 async function getToken(){