aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--service/httpd/httpd.go4
-rw-r--r--ui/ui.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/service/httpd/httpd.go b/service/httpd/httpd.go
index 612418d..2e93086 100644
--- a/service/httpd/httpd.go
+++ b/service/httpd/httpd.go
@@ -169,5 +169,9 @@ func setupHandler(cfg *config.Config, store *storage.Storage, feedHandler *feed.
api.Serve(router, store, feedHandler)
ui.Serve(router, cfg, store, pool, feedHandler)
+ router.HandleFunc("/healthcheck", func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte("OK"))
+ }).Name("healthcheck")
+
return router
}
diff --git a/ui/ui.go b/ui/ui.go
index 23440e7..91d4783 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -124,10 +124,6 @@ func Serve(router *mux.Router, cfg *config.Config, store *storage.Storage, pool
uiRouter.HandleFunc("/logout", handler.logout).Name("logout").Methods("GET")
uiRouter.HandleFunc("/", handler.showLoginPage).Name("login").Methods("GET")
- router.HandleFunc("/healthcheck", func(w http.ResponseWriter, r *http.Request) {
- w.Write([]byte("OK"))
- }).Name("healthcheck")
-
router.HandleFunc("/robots.txt", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
w.Write([]byte("User-agent: *\nDisallow: /"))