feat: implement API versioning /api/v1/
- All backend routers moved to /api/v1/ prefix
- Frontend BASE_URL updated to /api/v1
- Setup redirect middleware updated to redirect to /api/v1/setup
- Health router path fixed: prefix=/api/v1/health, @router.get('')
- conftest.py: set server_status=online for test fixture
- Created Docs/API_VERSIONING.md with deprecation policy
- Updated Docs/Backend-Development.md with versioning section
- Updated Instructions.md curl examples
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -380,6 +380,22 @@ class Settings(BaseSettings):
|
||||
"Larger batches are more efficient but introduce slight latency."
|
||||
),
|
||||
)
|
||||
# Rate limit configuration (per IP)
|
||||
rate_limit_bans_per_minute: int = Field(
|
||||
default=100,
|
||||
ge=1,
|
||||
description="Max ban/unban requests per IP per minute.",
|
||||
)
|
||||
rate_limit_blocklist_import_per_hour: int = Field(
|
||||
default=10,
|
||||
ge=1,
|
||||
description="Max blocklist import requests per IP per hour.",
|
||||
)
|
||||
rate_limit_config_update_per_minute: int = Field(
|
||||
default=50,
|
||||
ge=1,
|
||||
description="Max config update requests per IP per minute.",
|
||||
)
|
||||
|
||||
@field_validator("elasticsearch_hosts", mode="before")
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user