From 4b2b8e96c1bcbc53a6c3ded68ca539774191a3ba Mon Sep 17 00:00:00 2001 From: Steve White Date: Mon, 21 Oct 2024 11:06:32 -0500 Subject: [PATCH] add /api/v1 to endpoint path for proxying. --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 89b34e2..0866145 100644 --- a/main.go +++ b/main.go @@ -55,7 +55,9 @@ func main() { fmt.Println("Default user 'boxuser' created successfully!") // Create the router - router := mux.NewRouter() + baseRouter := mux.NewRouter() + + router := baseRouter.PathPrefix("/api/v1").Subrouter() // Define your routes router.Handle("/login", http.HandlerFunc(LoginHandler)).Methods("POST", "OPTIONS")