除了上面的页面之外,hiproxy还提供了增加新页面的功能。比如插件,为hiproxy增加了一个在线查看服务信息以及修改配置文件的页面,地址为:http://127.0.0.1:<port>/dashboard/

  • 路由规则(route):<String>,页面的地址模式,比如:,细节可以查看。
  • 渲染函数(render):<Function>,渲染页面,接收三个参数:(route, request, response)

当用户访问对应的页面时,render()方法会被调用,传入三个参数(route, request, response)

  • request: ,http请求对象。
  • response: <http.ServerResponse>,http响应对象。