From 3d8ba183fa4a796d5154768a9f438fa0fa1873dc Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Wed, 13 May 2026 16:10:33 +0000 Subject: [PATCH] go fix ./... --- sumdb/proxy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sumdb/proxy.go b/sumdb/proxy.go index e7b42cd..98c0bb0 100644 --- a/sumdb/proxy.go +++ b/sumdb/proxy.go @@ -84,11 +84,11 @@ func newReverseProxy(opts ProxyOpts) *httputil.ReverseProxy { } r.SetURL(distributor) r.Out.URL.Path = fmt.Sprintf(distributorCheckpointPathFmt, opts.WitnessSigs) - } else if strings.HasPrefix(inPath, tlogEntriesPrefix) { - o := strings.TrimPrefix(inPath, tlogEntriesPrefix) + } else if after, ok := strings.CutPrefix(inPath, tlogEntriesPrefix); ok { + o := after r.Out.URL.Path = fmt.Sprintf("%s%s", sumDBTileDataPrefix, o) - } else if strings.HasPrefix(inPath, tlogTilePrefix) { - o := strings.TrimPrefix(inPath, tlogTilePrefix) + } else if after, ok := strings.CutPrefix(inPath, tlogTilePrefix); ok { + o := after r.Out.URL.Path = fmt.Sprintf("%s%s", sumDBTilePrefix, o) } },