feat: Add CrowdSec logging, rate limiting, and fix MCP parameter defaults
- Add real client IP detection (CF-Connecting-IP / src fallback) to both frontends - Add per-IP rate limiting (429) using real IP for Cloudflare compatibility - Add CrowdSec syslog forwarding with custom log format - Add httplog option for detailed HTTP logging - Fix Python-level defaults on MCP tool parameters to match Field(default=X) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -162,7 +162,7 @@ def register_domain_tools(mcp):
|
||||
|
||||
@mcp.tool()
|
||||
def haproxy_list_domains(
|
||||
include_wildcards: Annotated[bool, Field(default=False, description="Include wildcard entries (.example.com). Default: False")]
|
||||
include_wildcards: Annotated[bool, Field(default=False, description="Include wildcard entries (.example.com). Default: False")] = False
|
||||
) -> str:
|
||||
"""List all configured domains with their backend servers."""
|
||||
try:
|
||||
@@ -206,9 +206,9 @@ def register_domain_tools(mcp):
|
||||
@mcp.tool()
|
||||
def haproxy_add_domain(
|
||||
domain: Annotated[str, Field(description="Domain name to add (e.g., api.example.com, example.com)")],
|
||||
ip: Annotated[str, Field(default="", description="Optional: Initial server IP. If provided, adds server to slot 1")],
|
||||
http_port: Annotated[int, Field(default=80, description="HTTP port for backend server (default: 80)")],
|
||||
share_with: Annotated[str, Field(default="", description="Optional: Existing domain to share pool with. New domain uses same backend servers.")]
|
||||
ip: Annotated[str, Field(default="", description="Optional: Initial server IP. If provided, adds server to slot 1")] = "",
|
||||
http_port: Annotated[int, Field(default=80, description="HTTP port for backend server (default: 80)")] = 80,
|
||||
share_with: Annotated[str, Field(default="", description="Optional: Existing domain to share pool with. New domain uses same backend servers.")] = ""
|
||||
) -> str:
|
||||
"""Add a new domain to HAProxy (no reload required).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user