feature/rate-limit (#91)
This commit is contained in:
@ -218,10 +218,13 @@ func registerAPIRoutes(a *echo.Group) {
|
||||
// Info endpoint
|
||||
a.GET("/info", apiv1.Info)
|
||||
|
||||
// ===== Routes with Authetification =====
|
||||
// ===== Routes with Authetication =====
|
||||
// Authetification
|
||||
a.Use(middleware.JWT([]byte(config.ServiceJWTSecret.GetString())))
|
||||
|
||||
// Rate limit
|
||||
setupRateLimit(a)
|
||||
|
||||
// Middleware to collect metrics
|
||||
if config.ServiceJWTSecret.GetBool() {
|
||||
a.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
|
Reference in New Issue
Block a user