mirror of
https://github.com/gin-gonic/gin.git
synced 2025-06-19 01:34:38 +08:00
Add rate limitting
This commit is contained in:
@ -8,7 +8,9 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
router := gin.Default()
|
||||
router := gin.New()
|
||||
router.Use(ratelimit, gin.Recovery(), gin.Logger())
|
||||
|
||||
router.LoadHTMLGlob("resources/*.templ.html")
|
||||
router.Static("/static", "resources/static")
|
||||
router.GET("/", index)
|
||||
|
Reference in New Issue
Block a user