We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 385594a commit 3c42131Copy full SHA for 3c42131
1 file changed
sumdb/proxy.go
@@ -84,11 +84,11 @@ func newReverseProxy(opts ProxyOpts) *httputil.ReverseProxy {
84
}
85
r.SetURL(distributor)
86
r.Out.URL.Path = fmt.Sprintf(distributorCheckpointPathFmt, opts.WitnessSigs)
87
- } else if strings.HasPrefix(inPath, tlogEntriesPrefix) {
88
- o := strings.TrimPrefix(inPath, tlogEntriesPrefix)
+ } else if after, ok := strings.CutPrefix(inPath, tlogEntriesPrefix); ok {
+ o := after
89
r.Out.URL.Path = fmt.Sprintf("%s%s", sumDBTileDataPrefix, o)
90
- } else if strings.HasPrefix(inPath, tlogTilePrefix) {
91
- o := strings.TrimPrefix(inPath, tlogTilePrefix)
+ } else if after, ok := strings.CutPrefix(inPath, tlogTilePrefix); ok {
92
r.Out.URL.Path = fmt.Sprintf("%s%s", sumDBTilePrefix, o)
93
94
},
0 commit comments