From 6f7acb6ddf8a64fe8e36b34dc87ce84cb0bd0f8f Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 15 Jan 2016 16:23:38 -0800 Subject: [PATCH] adding server logic for clients to request consistent TUF files Signed-off-by: David Lawrence (github: endophage) --- server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")))