Added CSP

This commit is contained in:
$(pass /github/name)
2024-08-26 13:52:55 +02:00
parent c03ee0b6d0
commit 12ea6767f8
5 changed files with 143 additions and 1 deletions

View File

@@ -54,9 +54,11 @@ func Run() {
router.Use(gin.Logger())
router.Use(middlewares.CORSMiddleware())
router.Use(middlewares.CSPMiddleware())
limiter := middlewares.NewIPRateLimiter(config.Security.Ratelimits.Limit, config.Security.Ratelimits.Burst)
router.Use(middlewares.RateLimitMiddleware(limiter))
routes.RegisterRoutes(router, userController, membershipController, contactController)
// create subrouter for teh authenticated area /account
// also pthprefix matches everything below /account