aboutsummaryrefslogtreecommitdiffhomepage
path: root/daemon/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/routes.go')
-rw-r--r--daemon/routes.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/routes.go b/daemon/routes.go
index 6b44fb4..35cec9e 100644
--- a/daemon/routes.go
+++ b/daemon/routes.go
@@ -45,6 +45,10 @@ func routes(cfg *config.Config, store *storage.Storage, feedHandler *feed.Handle
middleware.NewSessionMiddleware(cfg, store).Handler,
))
+ if cfg.BasePath() != "" {
+ router = router.PathPrefix(cfg.BasePath()).Subrouter()
+ }
+
router.Handle("/fever/", feverHandler.Use(feverController.Handler)).Name("feverEndpoint")
router.Handle("/v1/users", apiHandler.Use(apiController.CreateUser)).Methods("POST")