mirror of
https://github.com/go-micro/go-micro.git
synced 2025-03-17 20:28:06 +02:00
add namespace
This commit is contained in:
parent
1768958af7
commit
bf8ebf8ad2
@ -27,6 +27,11 @@ func (r *Resolver) Resolve(req *http.Request) (*resolver.Endpoint, error) {
|
||||
name = proxyRoute(req.URL.Path)
|
||||
}
|
||||
|
||||
// set the namespace if it exists
|
||||
if len(r.Options.Namespace) > 0 {
|
||||
name = r.Options.Namespace + "." + name
|
||||
}
|
||||
|
||||
return &resolver.Endpoint{
|
||||
Name: name,
|
||||
Method: method,
|
||||
|
Loading…
x
Reference in New Issue
Block a user