Bluesky avatar proxy thing
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add healthcheck endpoint at /

+10 -1
+10 -1
internal/server/server.go
··· 11 11 "tangled.org/angrydutchman.peedee.es/blavatar/internal/cache" 12 12 ) 13 13 14 - const avatarPathPattern = "GET /{identifier}" 14 + const ( 15 + avatarPathPattern = "GET /{identifier}" 16 + healthcheckPathPattern = "GET /" 17 + ) 15 18 16 19 // Server handles HTTP requests for avatars 17 20 type Server struct { ··· 33 36 // Start starts the HTTP server 34 37 func (s *Server) Start() error { 35 38 mux := http.NewServeMux() 39 + mux.HandleFunc(healthcheckPathPattern, handleHealthcheck) 36 40 mux.HandleFunc(avatarPathPattern, s.handleAvatar) 37 41 38 42 s.server = &http.Server{ ··· 108 112 } 109 113 w.Write(data) 110 114 } 115 + 116 + func handleHealthcheck(w http.ResponseWriter, r *http.Request) { 117 + w.WriteHeader(http.StatusOK) 118 + w.Write([]byte("OK")) 119 + }