add /api/v1 to endpoint path for proxying.
This commit is contained in:
parent
0f33941e65
commit
4b2b8e96c1
4
main.go
4
main.go
|
@ -55,7 +55,9 @@ func main() {
|
||||||
fmt.Println("Default user 'boxuser' created successfully!")
|
fmt.Println("Default user 'boxuser' created successfully!")
|
||||||
|
|
||||||
// Create the router
|
// Create the router
|
||||||
router := mux.NewRouter()
|
baseRouter := mux.NewRouter()
|
||||||
|
|
||||||
|
router := baseRouter.PathPrefix("/api/v1").Subrouter()
|
||||||
|
|
||||||
// Define your routes
|
// Define your routes
|
||||||
router.Handle("/login", http.HandlerFunc(LoginHandler)).Methods("POST", "OPTIONS")
|
router.Handle("/login", http.HandlerFunc(LoginHandler)).Methods("POST", "OPTIONS")
|
||||||
|
|
Loading…
Reference in New Issue