import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// RTGS 조회 콘솔 (:5174). Chanel(:8091)로 프록시하여 CORS 회피.
export default defineConfig({
  plugins: [react()],
  server: {
    port: 5174,
    proxy: {
      '/accounts': { target: 'http://localhost:8091', changeOrigin: true },
      '/inquiry': { target: 'http://localhost:8091', changeOrigin: true },
      '/pay': { target: 'http://localhost:8091', changeOrigin: true },
      '/meta': { target: 'http://localhost:8091', changeOrigin: true },
      '/rawmessage': { target: 'http://localhost:8091', changeOrigin: true },
      '/ledger': { target: 'http://localhost:8091', changeOrigin: true },
      '/admin': { target: 'http://localhost:8099', changeOrigin: true },
      '/gucci': { target: 'http://localhost:8095', changeOrigin: true },
    },
  },
})
