Adds rate limiting

This commit is contained in:
Manu Mtz-Almeida
2015-05-14 20:25:55 +02:00
parent eed6d93095
commit 3f48e0d45c
3 changed files with 15 additions and 1 deletions

View File

@ -26,7 +26,8 @@ func StartWorkers() {
func StartGin() {
gin.SetMode(gin.ReleaseMode)
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)