You've already forked AstralRinth
forked from didirus/AstralRinth
Add 10 second timeout to requests made server-side (#5164)
* add worker timeout for get requests * make it timeout only on server-side
This commit is contained in:
@@ -55,5 +55,8 @@ export const useBaseFetch = async (url, options = {}, skipAuth = false) => {
|
|||||||
delete options.apiVersion
|
delete options.apiVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
return await $fetch(`${base}${url}`, options)
|
return await $fetch(`${base}${url}`, {
|
||||||
|
timeout: import.meta.server ? 10000 : undefined,
|
||||||
|
...options,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user