proxy.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * @Author: code4eat awesomedema@gmail.com
  3. * @Date: 2024-04-09 18:07:34
  4. * @LastEditors: code4eat awesomedema@gmail.com
  5. * @LastEditTime: 2024-10-25 09:34:46
  6. * @FilePath: /KC-MiddlePlatform/config/proxy.ts
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. const proxy: { [key: string]: any } = {
  10. dev: {
  11. '/gateway': {
  12. //target: 'http://47.96.149.190:5000',
  13. target: 'http://120.27.235.181:5000',
  14. changeOrigin: true,
  15. // pathRewrite: { '^/master': '' },
  16. },
  17. '/api': {
  18. target: 'http://120.27.235.181:8083/',
  19. changeOrigin: true,
  20. pathRewrite: { '^/api': '' },
  21. },
  22. '/view': {
  23. target: 'http://120.27.235.181:8085/',
  24. changeOrigin: true,
  25. // pathRewrite: { '^/view': '' },
  26. },
  27. },
  28. mock: {
  29. '/master/': {
  30. target: 'http://localhost:8000',
  31. changeOrigin: true,
  32. pathRewrite: { '^': '' },
  33. },
  34. },
  35. };
  36. export default proxy;