--- a/README.md Mon Mar 07 02:14:35 2022 -0600
+++ b/README.md Mon Mar 07 02:22:45 2022 -0600
@@ -85,11 +85,14 @@
You can optionally disable either one of the HGWeb or SSH servers to limit
-resources or just disable the portions you don't need.
+resources or just disable the portions you don't need. However, the HTTP server +will always be active as it contains a health endpoint at `/hgk/health` and +could be used for integration with OpenSSH Server via the `--external-hostname` -For example, say you don't need public access or the web interface at all, you
-can disable it by passing `--disable-hgweb` to the `serve` command or by setting
-the `HGK_DISABLE_HGWEB` environment variable to `true`.
+For example, say you don't need public access or the HGWeb interface at all, +you can disable it by passing `--disable-hgweb` to the `serve` command or by +setting the `HGK_DISABLE_HGWEB` environment variable to `true`. Likewise, if you just want to serve up read only repositories over http you can
disable the SSH server by passing `--disable-ssh` to the `serve` command or by
--- a/http/server.go Mon Mar 07 02:14:35 2022 -0600
+++ b/http/server.go Mon Mar 07 02:22:45 2022 -0600
@@ -47,6 +47,8 @@
mux := http.NewServeMux()
+ mux.HandleFunc("/hgk/health", healthHandler) if s.externalHostname != "" {
mux.Handle("/hgk/authorized_keys", authorizedKeysHandler(s.externalHostname, s.externalPort))
log.Infof("added /hgk/authorized_keys endpoint with external hostname %s and export port %s", s.externalHostname, s.externalPort)