Merge remote-tracking branch 'upstream/gitlink_ssr_head' into gitlink_ssr_head

This commit is contained in:
黄心宇 2026-01-21 10:09:22 +08:00
commit f2e8b2f270
2 changed files with 13 additions and 12 deletions

View File

@ -202,6 +202,7 @@
"eslintConfig": {
"extends": "react-app"
},
"proxy": "https://testforgeplus.trustie.net",
"port": "3007",
"devDependencies": {
"@babel/core": "^7.23.6",

View File

@ -32,7 +32,7 @@ export function initAxiosInterceptors(props) {
// 判断网络是否连接
initOnlineOfflineListener();
var proxy = "https://testforgeplus.trustie.net";
// var proxy = "https://testforgeplus.trustie.net";
// var proxy = "http://172.20.32.201:4000";
// var proxy = "https://www.gitlink.org.cn";
@ -45,18 +45,18 @@ export function initAxiosInterceptors(props) {
requestProxy(config);
let url = `/api${config.url}`;
if (window.location.port === "3007") {
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') === -1) {
config.url = `${config.url}`;
} else {
config.url = `${config.url}`;
}
} else {
config.url = url;
}
// if (window.location.port === "3007") {
// config.url = `${proxy}${url}`;
// if (config.url.indexOf('?') === -1) {
// config.url = `${config.url}`;
// } else {
// config.url = `${config.url}`;
// }
// } else {
// config.url = url;
// }
config.withCredentials = false;
// config.url = url;
config.url = url;
return config;
},
err => {