Skip to content

Commit 8f981db

Browse files
committed
Fixing axios
1 parent 1c72f24 commit 8f981db

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

apps/web/lib/axios/axiosInstance.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import axios from "axios";
22
import { cookies } from "next/headers";
33

4+
let url = process.env.NEXT_PUBLIC_HTTP_URL;
5+
console.log("url0", url);
6+
if (url && !url.endsWith("/api/v1")) {
7+
url = url + "/api/v1";
8+
console.log("url1", url);
9+
}
10+
411
const axiosInstance = axios.create({
5-
baseURL: process.env.NEXT_PUBLIC_HTTP_URL,
12+
baseURL: url,
613
withCredentials: true,
714
});
815

0 commit comments

Comments
 (0)