chore: proxy backend routes via Next rewrites
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export const API_URL_ROOT = process.env.NEXT_PUBLIC_API_URL_ROOT || "";
|
||||
export const URL_MEDIA = process.env.NEXT_PUBLIC_URL_MEDIA || "";
|
||||
export const HOME_URL = process.env.NEXT_PUBLIC_HOME_URL || "http://localhost:3000";
|
||||
export const HOME_URL =
|
||||
process.env.NEXT_PUBLIC_HOME_URL ||
|
||||
(typeof window !== "undefined" ? window.location.origin : "");
|
||||
export const API = {
|
||||
User : {
|
||||
CURRENT: `${API_URL_ROOT}/users/current`,
|
||||
@@ -70,4 +72,4 @@ export const API = {
|
||||
GET_ALL: `${API_URL_ROOT}/statistics`,
|
||||
GET_BY_DATE: (date: string) => `${API_URL_ROOT}/statistics/${date}`,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user