This commit is contained in:
Horis
2024-07-11 20:19:10 +08:00
parent 3338adae5a
commit 4a54c9fc3f
2 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ const ajax = axios.create({
});
ajax.interceptors.request.use((config) => {
config.baseURL = remoteIp.value;
config.baseURL = baseUrl();
return config;
});
@@ -21,5 +21,5 @@ export const setRemoteIp = (ip) => {
};
export const baseUrl = () => {
return remoteIp.value;
return remoteIp.value || location.origin;
};