mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-28 00:34:47 -04:00
chore: Upgrade Node and Nuxt (#6240)
This commit is contained in:
@@ -6,16 +6,15 @@ export default defineNuxtPlugin(() => {
|
||||
const axiosInstance = axios.create({
|
||||
// timeout removed to allow backend to handle timeouts
|
||||
baseURL: "/", // api calls already pass with /api
|
||||
headers: {
|
||||
Authorization: "Bearer " + useCookie(tokenName).value,
|
||||
},
|
||||
withCredentials: true,
|
||||
});
|
||||
|
||||
// Add request interceptor
|
||||
axiosInstance.interceptors.request.use(
|
||||
(config) => {
|
||||
// You can add auth tokens or other headers here
|
||||
const token = useCookie(tokenName).value;
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(error) => {
|
||||
|
||||
Reference in New Issue
Block a user