dynamic baseURL

This commit is contained in:
Dobromir Popov
2024-02-26 22:44:25 +02:00
parent 9de291fc0c
commit bdacb18a07
3 changed files with 33 additions and 13 deletions

View File

@ -24,7 +24,7 @@ const axiosServer = async (context) => {
//headers['X-From-Server'] = token; // Note: Using the entire token as a header value might not be intended
return axios.create({
baseURL: common.getBaseUrl(),
baseURL: common.getBaseUrl("", context.req || req),
withCredentials: true,
headers: headers,
});