implement rate limiting

This commit is contained in:
2025-03-25 15:12:56 +00:00
parent 107f8e2642
commit 1a531af4f8
4 changed files with 40 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"log"
"net/http"
"synlotto-website/handlers"
"synlotto-website/helpers"
"synlotto-website/models"
"synlotto-website/storage"
@@ -35,5 +36,5 @@ func main() {
mux.HandleFunc("/results/thunderball", handlers.ResultsThunderball(db))
log.Println("🌐 Running on http://localhost:8080")
http.ListenAndServe(":8080", csrfMiddleware(mux))
http.ListenAndServe(":8080", helpers.RateLimit(csrfMiddleware(mux)))
}