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 <sjoerd@collabora.com>
This commit is contained in:
Sjoerd Simons
2022-06-12 08:10:25 +02:00
committed by Benj Fassbind
parent f9f1c8ee75
commit 29deae6fe0
+1
View File
@@ -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 {