forked from baron/baron-sso
feat: integrate orgfront and expose internal ids
This commit is contained in:
36
deploy/templates/orgfront/vite.config.ts
Normal file
36
deploy/templates/orgfront/vite.config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
const allowedHosts = [
|
||||
"{{ORGFRONT_DOMAIN}}",
|
||||
"baron-orgchart.hmac.kr",
|
||||
"localhost",
|
||||
"127.0.0.1",
|
||||
].filter(Boolean);
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
envPrefix: ["VITE_", "USERFRONT_"],
|
||||
server: {
|
||||
host: "127.0.0.1",
|
||||
// 인스턴스별 도메인을 자동으로 허용합니다.
|
||||
allowedHosts,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.API_PROXY_TARGET || "http://backend:{{BACKEND_PORT}}",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
host: "127.0.0.1",
|
||||
port: 5175,
|
||||
allowedHosts,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.API_PROXY_TARGET || "http://backend:{{BACKEND_PORT}}",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user