فهرست منبع

修改变量名

yjp 1 سال پیش
والد
کامیت
4336c80d33
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      project/gateway/main.go

+ 2 - 2
project/gateway/main.go

@@ -28,11 +28,11 @@ func main() {
 	gw := gateway.NewGateway()
 	defer gateway.DestroyGateway(gw)
 
-	gw.BindPassThrough(prefixRootBinder, &gateway.PassThrough{
+	gw.Redirect(prefixRootBinder, &gateway.PassThrough{
 		HttpMethod: http.MethodGet,
 		SimplePassThrough: &gateway.SimplePassThrough{
 			RelativePath: "/version",
-			ToUrl:        "http://localhost:31000/example/api/version",
+			ToBaseUrl:    "http://localhost:31000/example/api",
 		},
 	})