proxy.ts 299 B

12345678910
  1. import { API_BASE_URL, API_TARGET_URL } from './config'
  2. import type { ProxyOptions } from 'vite'
  3. export const proxy: Record<string, ProxyOptions> = {
  4. [API_BASE_URL]: {
  5. target: API_TARGET_URL,
  6. changeOrigin: true,
  7. rewrite: path => path.replace(new RegExp(`^${API_BASE_URL}`), '')
  8. }
  9. }