mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-03-07 15:31:00 +08:00
fix(frontend): use a sane request timeout
This commit is contained in:
parent
8b55f38be1
commit
25a0c1bf03
@ -9,8 +9,9 @@ import { transformAxiosError } from "~/composables/useErrorHandling";
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp: NuxtApp) => {
|
||||
const config = useConfig();
|
||||
const options = {
|
||||
const options: AxiosRequestConfig = {
|
||||
baseURL: import.meta.env.SSR ? config.proxyHost : config.publicHost,
|
||||
timeout: 2000,
|
||||
};
|
||||
axiosLog("axios options", options);
|
||||
const axiosInstance = axios.create(options);
|
||||
|
Loading…
Reference in New Issue
Block a user