From 572094700dbb539ee2f31b775336b282a8c688ef Mon Sep 17 00:00:00 2001 From: Ionut Balutoiu Date: Tue, 18 Jul 2023 16:54:52 +0300 Subject: [PATCH] Fix calling /api/v1/first-run without ending `/` The endpoint endpoint `/api/v1/first-run` only works when we have ending `/`. This commit fixes this. Signed-off-by: Ionut Balutoiu --- apiserver/routers/routers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/apiserver/routers/routers.go b/apiserver/routers/routers.go index 3b8a6900..77ff0cd4 100644 --- a/apiserver/routers/routers.go +++ b/apiserver/routers/routers.go @@ -98,6 +98,7 @@ func NewAPIRouter(han *controllers.APIController, logWriter io.Writer, authMiddl // FirstRunHandler firstRunRouter := apiSubRouter.PathPrefix("/first-run").Subrouter() firstRunRouter.Handle("/", http.HandlerFunc(han.FirstRunHandler)).Methods("POST", "OPTIONS") + firstRunRouter.Handle("", http.HandlerFunc(han.FirstRunHandler)).Methods("POST", "OPTIONS") // Instance URLs callbackRouter := apiSubRouter.PathPrefix("/callbacks").Subrouter()