diff --git a/server/server.go b/server/server.go index e0714cb90f..694da02be9 100644 --- a/server/server.go +++ b/server/server.go @@ -89,7 +89,7 @@ func RootHandler(ac auth.AccessController, ctx context.Context, trust signed.Cry prometheus.InstrumentHandlerWithOpts( prometheusOpts("UpdateTuf"), hand(handlers.AtomicUpdateHandler, "push", "pull"))) - r.Methods("GET").Path("/v2/{imageName:.*}/_trust/tuf/{tufRole:(root|targets(?:/[^/\\s]+)*|snapshot|timestamp)}.json").Handler( + r.Methods("GET").Path("/v2/{imageName:.*}/_trust/tuf/{consistent:([a-fA-F0-9]{64}|[a-fA-F0-9]{96}|[a-fA-F0-9]{128}).}{tufRole:(root|targets(?:/[^/\\s]+)*|snapshot|timestamp)}.json").Handler( prometheus.InstrumentHandlerWithOpts( prometheusOpts("GetRole"), hand(handlers.GetHandler, "pull")))