implement rate limiting
This commit is contained in:
3
main.go
3
main.go
@@ -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)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user