Quellcode durchsuchen

修改变量名

yjp vor 1 Jahr
Ursprung
Commit
4336c80d33
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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",
 		},
 	})