1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

rest: Use a subrouter for /api/ paths

This commit is contained in:
James Hillyerd
2018-10-22 10:48:08 -07:00
parent 1a7e47b60a
commit 82e6a9fe5d
3 changed files with 10 additions and 11 deletions

View File

@@ -125,7 +125,7 @@ func main() {
retentionScanner.Start()
// Start HTTP server.
web.Initialize(conf, shutdownChan, mmanager, msgHub)
rest.SetupRoutes(web.Router)
rest.SetupRoutes(web.Router.PathPrefix("/api/").Subrouter())
webui.SetupRoutes(web.Router)
go web.Start(rootCtx)
// Start POP3 server.