/ping with empty response

This commit is contained in:
Jakob Borg 2015-09-21 12:49:17 +02:00
parent 009b5bc72b
commit 3b2adc9a3e

View File

@ -55,6 +55,7 @@ func (s *querysrv) Serve() {
}
http.HandleFunc("/", s.handler)
http.HandleFunc("/ping", handlePing)
tlsListener, err := tls.Listen("tcp", s.addr, tlsCfg)
if err != nil {
@ -390,3 +391,7 @@ func (s *querysrv) getRelays(device protocol.DeviceID) ([]annRelay, error) {
return res, nil
}
func handlePing(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(204)
}