- DT 단말(:5180, dt.html/src/dt): 접속 센터 선택 후 해당 Gucci 관문으로 로그인·이체·조회. vite.dt.config 프록시 /dc1|/dc2|/dc3 -> 8095|8195|8295. X-Timestamp 초 단위(ReplayGuard). - 콘솔 센터 전환: auth.ts getDc/setDc + X-RTGS-DC 헤더, App.tsx 드롭다운(+reload), vite.config router로 헤더 기반 포트 라우팅(+0/+100/+200) → 3센터 원장·대사·보고서 전환 조회. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// RTGS 조회/관리 콘솔 (:5174). 요청 헤더 X-RTGS-DC(DC1/DC2/DC3)로 대상 센터 포트를 라우팅한다.
|
|
// Chanel계열 8091 / LouisVuitton(admin) 8099 / Gucci 8095, 센터별 +100/+200 오프셋.
|
|
const OFFSET: Record<string, number> = { DC1: 0, DC2: 100, DC3: 200 }
|
|
const off = (req: any) => OFFSET[(req.headers?.['x-rtgs-dc'] as string) || 'DC1'] ?? 0
|
|
const routed = (basePort: number) => ({
|
|
target: `http://localhost:${basePort}`,
|
|
changeOrigin: true,
|
|
router: (req: any) => `http://localhost:${basePort + off(req)}`,
|
|
})
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5174,
|
|
proxy: {
|
|
'/accounts': routed(8091),
|
|
'/inquiry': routed(8091),
|
|
'/pay': routed(8091),
|
|
'/meta': routed(8091),
|
|
'/rawmessage': routed(8091),
|
|
'/notifications': routed(8091),
|
|
'/ledger': routed(8091),
|
|
'/admin': routed(8099),
|
|
'/console': routed(8099),
|
|
'/gucci': routed(8095),
|
|
},
|
|
},
|
|
})
|