mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-23 09:44:09 +00:00
♻️ make fossorial remote API only configurable on the frontend and only in DEV
This commit is contained in:
@@ -51,8 +51,14 @@ export const internal = axios.create({
|
||||
}
|
||||
});
|
||||
|
||||
const remoteAPIURL =
|
||||
process.env.NODE_ENV === "development"
|
||||
? (process.env.NEXT_PUBLIC_FOSSORIAL_REMOTE_API_URL ??
|
||||
"https://api.fossorial.io")
|
||||
: "https://api.fossorial.io";
|
||||
|
||||
export const remote = axios.create({
|
||||
baseURL: `${process.env.NEXT_PUBLIC_FOSSORIAL_REMOTE_API_URL}/api/v1`,
|
||||
baseURL: `${remoteAPIURL}/api/v1`,
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user