add namespace

This commit is contained in:
Asim Aslam 2020-04-08 23:27:32 +01:00
parent 1768958af7
commit bf8ebf8ad2

View File

@ -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,