aboutsummaryrefslogtreecommitdiff
path: root/pkg/instance/instance.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/instance/instance.go')
-rw-r--r--pkg/instance/instance.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go
index fbfe4df..dc7f5c5 100644
--- a/pkg/instance/instance.go
+++ b/pkg/instance/instance.go
@@ -64,7 +64,10 @@ func (i *Instance) Handlers() []Handler {
// Path returns a path that should be configured for this handler
func (h Handler) Path() string {
- return h.Endpoint.Path(h.Instance.Prefix, "sigsum", "v0")
+ if len(h.Instance.Prefix) == 0 {
+ return h.Endpoint.Path("", "sigsum", "v0")
+ }
+ return h.Endpoint.Path("", h.Instance.Prefix, "sigsum", "v0")
}
// ServeHTTP is part of the http.Handler interface