proxy.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:00:52
  4. * @LastEditTime: 2023-04-20 13:31:09
  5. * @LastEditors: code4eat awesomedema@gmail.com
  6. * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  7. * @FilePath: /KC-MiddlePlatform/config/proxy.ts
  8. */
  9. //118.31.245.65 7004 线上
  10. //112.124.59.133 7001 测试
  11. //192.168.50.190:7001
  12. const proxy: { [key: string]: any } = {
  13. dev: {
  14. '/master': {
  15. target: 'http://47.97.190.5:7004',
  16. //target: 'http://118.31.245.65:7005/',
  17. changeOrigin: true,
  18. // pathRewrite: { '^/master': '' },
  19. },
  20. '/api': {
  21. target: 'http://47.97.190.5:8804/',
  22. changeOrigin: true,
  23. pathRewrite: { '^/api': '' },
  24. },
  25. '/view': {
  26. target: 'http://47.97.190.5:8807',
  27. changeOrigin: true,
  28. // pathRewrite: { '^/view': '' },
  29. },
  30. },
  31. mock: {
  32. '/master/': {
  33. target: 'http://localhost:8000',
  34. changeOrigin: true,
  35. pathRewrite: { '^': '' },
  36. },
  37. },
  38. };
  39. export default proxy;