allow proxy to intercept unversioned (i.e. 1.0) urls

This commit is contained in:
Paul Bellamy committed 2015-05-28 16:24:02 +01:00
1 parent b26e2128e4
commit 169eb19523
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ import (
)
var (
containerIDRegexp = regexp.MustCompile("^/v[0-9\\.]*/containers/([^/]*)/.*")
containerIDRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/([^/]*)/.*")
weaveWaitEntrypoint = []string{"/home/weavewait/weavewait"}
)
@@ -54,7 +54,7 @@ func inspectContainerInPath(client *docker.Client, path string) (*docker.Contain
Warning.Println(err)
return nil, err
}
containerID := subs[1]
containerID := subs[2]
container, err := client.InspectContainer(containerID)
if err != nil {
+3 -3
View File
@@ -12,9 +12,9 @@ import (
)
var (
containerCreateRegexp = regexp.MustCompile("/v[0-9\\.]*/containers/create")
containerStartRegexp = regexp.MustCompile("^/v[0-9\\.]*/containers/[^/]*/(re)?start$")
execCreateRegexp = regexp.MustCompile("^/v[0-9\\.]*/containers/[^/]*/exec$")
containerCreateRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/create$")
containerStartRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/[^/]*/(re)?start$")
execCreateRegexp = regexp.MustCompile("^(/v[0-9\\.]*)?/containers/[^/]*/exec$")
)
type Proxy struct {