proxy.ts 386 B

123456789101112131415
  1. export const proxy = {
  2. "/dev/": {
  3. target: "http://127.0.0.1:8001",
  4. // target: "http://192.168.0.112:8001",
  5. // target: "https://dev-admin.cool-js.cloud",
  6. changeOrigin: true,
  7. rewrite: (path: string) => path.replace(/^\/dev/, "")
  8. },
  9. "/prod/": {
  10. target: "https://show.cool-admin.com",
  11. changeOrigin: true,
  12. rewrite: (path: string) => path.replace(/^\/prod/, "/api")
  13. }
  14. };