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",
 		},
 	})