pass baseurl to header

This commit is contained in:
Roba Boru
2026-07-14 12:26:29 +03:00
parent 8cc2ad969f
commit 8ade28f70d

View File

@@ -21,6 +21,9 @@ class ApiClient {
if (token && token !== "null" && token !== "undefined") {
config.headers.Authorization = `Bearer ${token}`;
}
if (typeof window !== "undefined") {
config.headers["X-Frontend-Base-URL"] = window.location.origin;
}
return config;
});