Actually publish visit notification
This commit is contained in:
parent
f032c25ef7
commit
337d4cf9a1
1 changed files with 4 additions and 1 deletions
|
|
@ -154,7 +154,10 @@ func SetupAuth() {
|
|||
|
||||
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Printf("%s - [%s] (%s) %s\n", time.Now().Format(time.RFC3339), r.RemoteAddr, r.Method, r.URL)
|
||||
h.visits.HandleVisit(r.RemoteAddr)
|
||||
visit := h.visits.HandleVisit(r.RemoteAddr)
|
||||
if visit != nil {
|
||||
h.ntfy.PublishNewVisitNotification(visit)
|
||||
}
|
||||
|
||||
switch true {
|
||||
case r.Method == "GET" && r.URL.Path == "/favicon.ico":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue