add /api/v1 to endpoint path for proxying.

This commit is contained in:
Steve White 2024-10-21 11:06:32 -05:00
parent 0f33941e65
commit 4b2b8e96c1
1 changed files with 3 additions and 1 deletions

View File

@ -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")