From 29deae6fe09841aabfb9392746bb707e7ee5b34a Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sun, 12 Jun 2022 08:10:25 +0200 Subject: [PATCH] api: allow parameters with urlencoded names Aptly allows create e.g. repos with a / to use those with the REST api the router needs to allow urlencoded parameters in various places to represent this. A specific example of this is the /api/repos/:name/packages path Signed-off-by: Sjoerd Simons --- api/router.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/router.go b/api/router.go index 50b8d628..d3b4e98f 100644 --- a/api/router.go +++ b/api/router.go @@ -21,6 +21,7 @@ func Router(c *ctx.AptlyContext) http.Handler { context = c router := gin.Default() + router.UseRawPath = true router.Use(gin.ErrorLogger()) if c.Config().EnableMetricsEndpoint {