File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -56,13 +56,12 @@ impl GatewayCtx {
56
56
builder = builder. authority ( authority. clone ( ) ) ;
57
57
}
58
58
59
- let path_and_query = if let Some ( query) = req. uri . query ( ) {
60
- format ! ( "{}?{}" , self . upstream_path, query)
59
+ if let Some ( query) = req. uri . query ( ) {
60
+ builder = builder . path_and_query ( format ! ( "{}?{}" , self . upstream_path, query) ) ;
61
61
} else {
62
- self . upstream_path . clone ( )
62
+ builder = builder . path_and_query ( & self . upstream_path ) ;
63
63
} ;
64
64
65
- builder = builder. path_and_query ( path_and_query) ;
66
65
builder. build ( ) . context ( "failed to build uri" )
67
66
}
68
67
}
@@ -130,8 +129,8 @@ impl GatewayServer {
130
129
}
131
130
}
132
131
133
- pub fn is_empty ( & self ) -> bool {
134
- self . gateways . is_empty ( )
132
+ pub fn has_configurations ( & self ) -> bool {
133
+ ! self . gateways . is_empty ( )
135
134
}
136
135
137
136
pub fn get_gateway ( & self , name : & str ) -> Option < & Arc < Gateway > > {
@@ -301,7 +300,7 @@ impl ProxyHttp for GatewayServer {
301
300
target
302
301
} else {
303
302
return Err ( api:: Error :: internal ( anyhow:: anyhow!(
304
- "route path was not prefixed with target service name"
303
+ "path was not prefixed with target service name"
305
304
) )
306
305
. into ( ) ) ;
307
306
}
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ impl ManagerConfig<'_> {
162
162
let routes = paths:: compute (
163
163
endpoints
164
164
. iter ( )
165
- // TODO(fredr) we should filter out only public routs here
165
+ // TODO(fredr): we should filter out only public routes here
166
166
// .filter(|(_, ep)| ep.exposed.contains(name))
167
167
. map ( |( _, ep) | RoutePerService ( ep. to_owned ( ) ) ) ,
168
168
) ;
You can’t perform that action at this time.
0 commit comments