feat: add http rate limiting
This commit is contained in:
@@ -15,6 +15,7 @@ type Config struct {
|
||||
BaseURI *string
|
||||
Tls *Tls
|
||||
Cors *Cors
|
||||
RateLimit *RateLimit
|
||||
}
|
||||
|
||||
type Tls struct {
|
||||
@@ -27,6 +28,14 @@ type Cors struct {
|
||||
Whitelist []Whitelist
|
||||
}
|
||||
|
||||
type RateLimit struct {
|
||||
Enabled bool
|
||||
Max int
|
||||
WindowSeconds int
|
||||
Message string
|
||||
SkipPaths []string
|
||||
}
|
||||
|
||||
type Whitelist struct {
|
||||
AllowOrigin string
|
||||
AllowHeaders string
|
||||
|
||||
Reference in New Issue
Block a user