feat: favicon

This commit is contained in:
trafficlunar 2025-07-20 16:25:05 +01:00
parent 25842d4bdd
commit af790e5765
5 changed files with 23 additions and 35 deletions

View file

@ -59,6 +59,9 @@ func NewRouter() {
"url": "https://github.com/trafficlunar/api",
})
})
r.Get("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "./favicon.ico")
})
r.Get("/hit", handler.HandleGetHitCounter)
r.With(httprate.LimitByRealIP(1, time.Hour)).Patch("/hit", handler.HandlePatchHitCounter)