fix network inspect via name for global scope

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Victor Vieux 2015-10-27 20:40:13 -07:00
parent ae81ef652e
commit 479db2904f
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)