fix: normalize CPA base URL before saving
This commit is contained in:
@@ -307,6 +307,10 @@ def _normalize_config(cfg: Dict[str, Any]) -> Dict[str, Any]:
|
||||
except (TypeError, ValueError):
|
||||
cfg["proxy_pool_count"] = 1
|
||||
cfg["proxy_pool_country"] = str(cfg.get("proxy_pool_country", "US") or "US").strip().upper() or "US"
|
||||
cpa_base_url = str(cfg.get("cpa_base_url", "") or "").strip().rstrip("/")
|
||||
if cpa_base_url.lower().endswith("/v0"):
|
||||
cpa_base_url = cpa_base_url[:-3].rstrip("/")
|
||||
cfg["cpa_base_url"] = cpa_base_url
|
||||
return cfg
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user