Skip to content
Snippets Groups Projects
Commit acf4f24d authored by Nicolas PAGNY's avatar Nicolas PAGNY
Browse files

Add api/user handler in rootmux server

parent 17e909db
Branches
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import (
"forge.grandlyon.com/npernoud/glcpro/internal/matcher"
"forge.grandlyon.com/npernoud/glcpro/internal/oidcserver"
"forge.grandlyon.com/npernoud/glcpro/internal/user"
"forge.grandlyon.com/npernoud/glcpro/pkg/common"
"forge.grandlyon.com/npernoud/glcpro/pkg/middlewares"
)
......@@ -21,6 +22,7 @@ func CreateRootMux(staticDir string) *http.ServeMux {
mainMux.Handle("/api/", http.StripPrefix("/api", apiMux))
mainMux.Handle("/api/oidc/", middlewares.Cors(http.StripPrefix("/api/oidc", oidcserver.CreateOIDCServer())))
mainMux.Handle("/api/matcher/", middlewares.Cors(http.StripPrefix("/api/matcher", matcher.CreateMatcherServer())))
mainMux.Handle("/api/user/", middlewares.Cors(http.StripPrefix("/api/user", user.CreateUserServer())))
// Serve static files falling back to serving index.html
mainMux.Handle("/", middlewares.NoCache(http.FileServer(&common.FallBackWrapper{Assets: http.Dir(staticDir)})))
// Put it together into the main handler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment