mirror of
https://github.com/hhftechnology/middleware-manager.git
synced 2026-04-26 10:40:49 +00:00
remove-IPWhiteList-deprecated
This commit is contained in:
parent
6a4a6d9979
commit
d194ccd2da
9 changed files with 2 additions and 33 deletions
|
|
@ -32,7 +32,6 @@ func isValidMiddlewareType(typ string) bool {
|
|||
"basicAuth": true,
|
||||
"digestAuth": true,
|
||||
"forwardAuth": true,
|
||||
"ipWhiteList": true,
|
||||
"ipAllowList": true,
|
||||
"rateLimit": true,
|
||||
"headers": true,
|
||||
|
|
|
|||
|
|
@ -574,18 +574,6 @@ func SaveTemplateFile(templatesDir string) error {
|
|||
},
|
||||
|
||||
// Security middlewares
|
||||
{
|
||||
ID: "ip-whitelist",
|
||||
Name: "IP Whitelist",
|
||||
Type: "ipWhiteList",
|
||||
Config: map[string]interface{}{
|
||||
"sourceRange": []string{
|
||||
"127.0.0.1/32",
|
||||
"192.168.1.0/24",
|
||||
"10.0.0.0/8",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "ip-allowlist",
|
||||
Name: "IP Allow List",
|
||||
|
|
|
|||
|
|
@ -58,15 +58,6 @@ middlewares:
|
|||
- "X-JWT-Email"
|
||||
|
||||
# Security middlewares
|
||||
- id: ip-whitelist
|
||||
name: IP Whitelist
|
||||
type: ipWhiteList
|
||||
config:
|
||||
sourceRange:
|
||||
- "127.0.0.1/32"
|
||||
- "192.168.1.0/24"
|
||||
- "10.0.0.0/8"
|
||||
|
||||
- id: ip-allowlist
|
||||
name: IP Allow List
|
||||
type: ipAllowList
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ var middlewareProcessors = map[string]MiddlewareProcessor{
|
|||
"plugin": &PluginProcessor{},
|
||||
"rateLimit": &RateLimitProcessor{},
|
||||
"inFlightReq": &RateLimitProcessor{},
|
||||
"ipWhiteList": &IPFilterProcessor{},
|
||||
"ipAllowList": &IPFilterProcessor{},
|
||||
"buffering": &BufferingProcessor{}, // ADD THIS LINE
|
||||
// Add more middleware types as needed
|
||||
|
|
|
|||
|
|
@ -85,9 +85,6 @@ type TCPMiddleware struct {
|
|||
IPAllowList *struct {
|
||||
SourceRange []string `json:"sourceRange"`
|
||||
} `json:"ipAllowList,omitempty"`
|
||||
IPWhiteList *struct {
|
||||
SourceRange []string `json:"sourceRange"`
|
||||
} `json:"ipWhiteList,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPRouter is a type alias for TraefikRouter with SQL driver support
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ func detectMiddlewareType(config map[string]interface{}) string {
|
|||
// Check for known middleware type keys
|
||||
typeKeys := []string{
|
||||
"basicAuth", "digestAuth", "forwardAuth",
|
||||
"ipWhiteList", "ipAllowList",
|
||||
"ipAllowList",
|
||||
"rateLimit", "headers",
|
||||
"stripPrefix", "stripPrefixRegex",
|
||||
"addPrefix", "redirectRegex", "redirectScheme",
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ function TCPMiddlewareTable({ middlewares }: { middlewares: TCPMiddleware[] }) {
|
|||
<Badge variant="secondary">{middleware.type}</Badge>
|
||||
) : middleware.inFlightConn ? (
|
||||
<Badge variant="secondary">InFlightConn</Badge>
|
||||
) : middleware.ipAllowList || middleware.ipWhiteList ? (
|
||||
) : middleware.ipAllowList ? (
|
||||
<Badge variant="secondary">IPAllowList</Badge>
|
||||
) : (
|
||||
<span className="text-muted-foreground">-</span>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ export type MiddlewareType =
|
|||
| 'basicAuth'
|
||||
| 'digestAuth'
|
||||
| 'forwardAuth'
|
||||
| 'ipWhiteList'
|
||||
| 'ipAllowList'
|
||||
| 'rateLimit'
|
||||
| 'headers'
|
||||
|
|
@ -58,7 +57,6 @@ export const MIDDLEWARE_TYPE_LABELS: Record<MiddlewareType, string> = {
|
|||
basicAuth: 'Basic Auth',
|
||||
digestAuth: 'Digest Auth',
|
||||
forwardAuth: 'Forward Auth',
|
||||
ipWhiteList: 'IP Whitelist',
|
||||
ipAllowList: 'IP Allowlist',
|
||||
rateLimit: 'Rate Limit',
|
||||
headers: 'Headers',
|
||||
|
|
|
|||
|
|
@ -174,9 +174,6 @@ export interface TCPMiddleware {
|
|||
ipAllowList?: {
|
||||
sourceRange: string[]
|
||||
}
|
||||
ipWhiteList?: {
|
||||
sourceRange: string[]
|
||||
}
|
||||
}
|
||||
|
||||
// Entrypoint Configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue