yjp 1 год назад
Родитель
Сommit
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",
 		},
 	})