feat: add accessPolicy middleware to allow or deny a list of Ips

This commit is contained in:
2024-12-09 11:00:14 +01:00
parent 262d616e8e
commit f3c2bdcebc
9 changed files with 178 additions and 17 deletions

View File

@@ -167,7 +167,14 @@ type Redis struct {
Password string `yaml:"password"`
}
// ExtraRouteConfig contains additional routes and middlewares directory
type ExtraRouteConfig struct {
Directory string `yaml:"directory"`
Watch bool `yaml:"watch"`
}
// AccessPolicyRuleMiddleware access policy
type AccessPolicyRuleMiddleware struct {
Action string `yaml:"action,omitempty"` // action, ALLOW or DENY
SourceRanges []string `yaml:"sourceRanges"` // list of Ips
}