Merge pull request #1346 from vieux/fix_network_inspect

fix network inspect via name for global scope
This commit is contained in:
Alexandre Beslic 2015-10-27 21:12:20 -07:00
commit 6db3956c4a
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ func ping(c *context, w http.ResponseWriter, r *http.Request) {
// Proxy a request to the right node
func proxyNetwork(c *context, w http.ResponseWriter, r *http.Request) {
var id = mux.Vars(r)["networkid"]
if network := c.cluster.Networks().Get(id); network != nil {
if network := c.cluster.Networks().Uniq().Get(id); network != nil {
// Set the network ID in the proxied URL path.
r.URL.Path = strings.Replace(r.URL.Path, id, network.ID, 1)