diff --git a/web/src/client.ts b/web/src/client.ts new file mode 100644 index 0000000..76d122a --- /dev/null +++ b/web/src/client.ts @@ -0,0 +1,11 @@ +import axios from "axios"; +import { store } from "@/store"; +let axiosInstance = axios.create({ + baseURL: import.meta.env.VITE_BACKEND_URL, +}); +axiosInstance.interceptors.request.use((config) => { + config.headers.Authorization = `Bearer ${store.token}`; + return config; +}); + +export { axiosInstance }; diff --git a/web/src/components/HeaderBar.vue b/web/src/components/HeaderBar.vue index 2751807..da95bd9 100644 --- a/web/src/components/HeaderBar.vue +++ b/web/src/components/HeaderBar.vue @@ -215,6 +215,9 @@ + + Who am I??? +