mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 09:50:21 +08:00
feat: support api key ip restriction rules
This commit is contained in:
@@ -176,7 +176,7 @@ CREATE TABLE IF NOT EXISTS public.api_keys (
|
||||
allowed_providers json,
|
||||
allowed_api_formats json,
|
||||
allowed_models json,
|
||||
allowed_ips jsonb,
|
||||
ip_rules jsonb,
|
||||
rate_limit integer DEFAULT 100,
|
||||
concurrent_limit integer,
|
||||
force_capabilities json,
|
||||
|
||||
@@ -75,7 +75,7 @@ CREATE TABLE IF NOT EXISTS api_keys (
|
||||
`allowed_models` JSON,
|
||||
`allowed_providers` JSON,
|
||||
`allowed_api_formats` JSON,
|
||||
`allowed_ips` JSON,
|
||||
`ip_rules` JSON,
|
||||
`rate_limit` INT DEFAULT 100,
|
||||
`concurrent_limit` INT,
|
||||
`force_capabilities` JSON,
|
||||
|
||||
@@ -78,7 +78,7 @@ CREATE TABLE IF NOT EXISTS public.api_keys (
|
||||
allowed_models jsonb,
|
||||
allowed_providers jsonb,
|
||||
allowed_api_formats jsonb,
|
||||
allowed_ips jsonb,
|
||||
ip_rules jsonb,
|
||||
rate_limit integer DEFAULT 100,
|
||||
concurrent_limit integer,
|
||||
force_capabilities jsonb,
|
||||
|
||||
@@ -73,7 +73,7 @@ CREATE TABLE IF NOT EXISTS api_keys (
|
||||
allowed_models TEXT,
|
||||
allowed_providers TEXT,
|
||||
allowed_api_formats TEXT,
|
||||
allowed_ips TEXT,
|
||||
ip_rules TEXT,
|
||||
rate_limit INTEGER DEFAULT 100,
|
||||
concurrent_limit INTEGER,
|
||||
force_capabilities TEXT,
|
||||
|
||||
@@ -334,7 +334,7 @@ type = "json"
|
||||
nullable = true
|
||||
|
||||
[[table.api_keys.columns]]
|
||||
name = "allowed_ips"
|
||||
name = "ip_rules"
|
||||
type = "json"
|
||||
nullable = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user