Add haproxy_cleanup_wildcards tool to remove subdomain wildcard entries
New db_remove_wildcard() for surgical wildcard-only deletion. New haproxy_cleanup_wildcards tool scans all wildcard entries and removes those belonging to subdomains (e.g., *.nocodb.inouter.com) while keeping base domain wildcards (e.g., *.anvil.it.com). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -355,6 +355,21 @@ def db_remove_domain(domain: str) -> None:
|
||||
conn.commit()
|
||||
|
||||
|
||||
def db_remove_wildcard(domain: str) -> bool:
|
||||
"""Remove only the wildcard entry for a domain from the database.
|
||||
|
||||
Args:
|
||||
domain: Base domain name (without leading dot, e.g., "nocodb.inouter.com").
|
||||
|
||||
Returns:
|
||||
True if a wildcard entry was deleted, False if not found.
|
||||
"""
|
||||
conn = get_connection()
|
||||
cur = conn.execute("DELETE FROM domains WHERE domain = ? AND is_wildcard = 1", (f".{domain}",))
|
||||
conn.commit()
|
||||
return cur.rowcount > 0
|
||||
|
||||
|
||||
def db_find_available_pool() -> Optional[str]:
|
||||
"""Find the first available pool not assigned to any domain.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user