http: prefix with v1

This commit is contained in:
Mitchell Hashimoto
2015-03-12 10:47:31 -07:00
parent 1115518349
commit 549631a896
2 changed files with 4 additions and 4 deletions

View File

@@ -11,9 +11,9 @@ import (
// its own to mount the Vault API within another web server. // its own to mount the Vault API within another web server.
func Handler(core *vault.Core) http.Handler { func Handler(core *vault.Core) http.Handler {
mux := http.NewServeMux() mux := http.NewServeMux()
mux.Handle("/sys/seal-status", handleSysSealStatus(core)) mux.Handle("/v1/sys/seal-status", handleSysSealStatus(core))
mux.Handle("/sys/seal", handleSysSeal(core)) mux.Handle("/v1/sys/seal", handleSysSeal(core))
mux.Handle("/sys/unseal", handleSysUnseal(core)) mux.Handle("/v1/sys/unseal", handleSysUnseal(core))
return mux return mux
} }

View File

@@ -12,7 +12,7 @@ func TestSysSealStatus(t *testing.T) {
ln, addr := testServer(t, core) ln, addr := testServer(t, core)
defer ln.Close() defer ln.Close()
resp, err := http.Get(addr + "/sys/seal-status") resp, err := http.Get(addr + "/v1/sys/seal-status")
if err != nil { if err != nil {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
} }