Amend Upstream URL
This commit is contained in:
10
src/main.ts
10
src/main.ts
@@ -139,8 +139,16 @@ router.beforeEach(async (to) => {
|
||||
app.use(router);
|
||||
app.use(ToastService)
|
||||
|
||||
let apiUrl = getApiUrl();
|
||||
|
||||
if (!apiUrl) {
|
||||
apiUrl = `http://${apiUrl}`
|
||||
} else {
|
||||
apiUrl = ''
|
||||
}
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: getApiUrl() ?? '',
|
||||
baseURL: apiUrl,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user