π OpenHands: AI-Driven Development
fix #7267: adding base url to axios (#7267)
Marco Dalalba8b68d086f003
diff --git a/frontend/src/api/open-hands-axios.ts b/frontend/src/api/open-hands-axios.tsindex 3b95741bbc..de1bbb8ed2 100644--- a/frontend/src/api/open-hands-axios.ts+++ b/frontend/src/api/open-hands-axios.ts@@ -1,7 +1,8 @@import axios from "axios";-export const openHands = axios.create();-+export const openHands = axios.create({+ baseURL: `${window.location.protocol}//${import.meta.env.VITE_BACKEND_BASE_URL || window?.location.host}`,+});export const setAuthTokenHeader = (token: string) => {openHands.defaults.headers.common.Authorization = `Bearer ${token}`;};