本地主机消除502
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
const common_vendor = require("./vendor.js");
|
||||
const envBaseUrl = typeof process !== "undefined" && process.env && (process.env.VITE_APP_API_BASE_URL || process.env.API_BASE_URL) || "";
|
||||
const storageBaseUrl = typeof common_vendor.index !== "undefined" ? common_vendor.index.getStorageSync("API_BASE_URL") || "" : "";
|
||||
const fallbackBaseUrl = "http://192.168.31.193:8080";
|
||||
const fallbackBaseUrl = "http://127.0.0.1:8080";
|
||||
const API_BASE_URL = (envBaseUrl || storageBaseUrl || fallbackBaseUrl).replace(/\/$/, "");
|
||||
const candidateBases = [envBaseUrl, storageBaseUrl, fallbackBaseUrl, "http://127.0.0.1:8080", "http://localhost:8080"];
|
||||
const API_BASE_URL_CANDIDATES = Array.from(new Set(candidateBases.filter(Boolean))).map((u) => String(u).replace(/\/$/, ""));
|
||||
|
||||
Reference in New Issue
Block a user