Skip to content

代理匹配到了 为什么还会走路由 ? #9

@shen-lan

Description

@shen-lan

路由里有一条

router.get('/*', controller.tapd.staticMatch)
config.default.js

 config.httpProxy = {
    '/self': {
      target: 'https://api.xxxx.cn',
      pathRewrite: {
        '^/self': ''
      }
    }
  };  
plugin.js

  httpProxy: {
    enable: true,
    package: 'egg-http-proxy',
  } 

浏览器请求

http://127.0.0.1:7001/self/tasks/count?workspace_id=59395005

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions