proxy.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:00:52
  4. * @LastEditTime: 2023-01-13 17:49:31
  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. '/gateway': {
  15. target: 'http://112.124.59.133:5000',
  16. //target: 'http://118.31.245.65:7005/',
  17. changeOrigin: true,
  18. // pathRewrite: { '^/gateway': '' },
  19. },
  20. '/api': {
  21. target: 'http://118.31.245.65:8083/',
  22. //target: 'http://112.124.59.133:8083/',
  23. //target: 'http://112.124.59.133:5000/',
  24. changeOrigin: true,
  25. pathRewrite: { '^/api': '' },
  26. },
  27. '/view': {
  28. target: 'http://118.31.245.65:8085/',
  29. //target: 'http://112.124.59.133:8083/',
  30. changeOrigin: true,
  31. pathRewrite: { '^/view': '' },
  32. },
  33. },
  34. mock: {
  35. '/master/': {
  36. target: 'http://localhost:8000',
  37. changeOrigin: true,
  38. pathRewrite: { '^': '' },
  39. },
  40. },
  41. };
  42. export default proxy;