Revert "[common/features] feat: 환경 변수 URL 방식 도입"
This reverts commit e4d52611d7.
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
"use client";
|
||||
import { PROXY_HOST } from "./env";
|
||||
|
||||
import { getCookie, getEnv } from "../lib";
|
||||
|
||||
const SITE_ID = getCookie("site-id-key") ?? "";
|
||||
const PROXY_HOST_KEY = `NEXT_PUBLIC_PROXY_HOST_${SITE_ID}`;
|
||||
export const BASE_URL = `${getEnv(PROXY_HOST_KEY)}/server`;
|
||||
export const BASE_URL = `${PROXY_HOST}/server`;
|
||||
|
||||
export const ENDPOINT = {
|
||||
ATTACH_SERVICE: {
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
__ENV__?: Record<string, string>;
|
||||
}
|
||||
}
|
||||
|
||||
export function getEnvConfig(): Record<string, string> {
|
||||
if (typeof window === "undefined") return {};
|
||||
return window.__ENV__ ?? {};
|
||||
}
|
||||
|
||||
export function getEnv(key: string): string | undefined {
|
||||
return getEnvConfig()[key];
|
||||
}
|
||||
@@ -3,4 +3,3 @@ export { useAlertStore } from "./use-alert-store";
|
||||
export { useMenuStore } from "./use-menu-store";
|
||||
export { useUserStore } from "./use-user-store";
|
||||
export { usePrompt } from "./use-prompt";
|
||||
export { getEnv } from "./env";
|
||||
|
||||
Reference in New Issue
Block a user