|
|
|
@ -753,7 +753,16 @@ def call_deployer_agent(endpoint, method="GET", data=None, config=None):
|
|
|
|
timeout = config.get("timeout", 30)
|
|
|
|
timeout = config.get("timeout", 30)
|
|
|
|
|
|
|
|
|
|
|
|
protocol = "https" if use_ssl else "http"
|
|
|
|
protocol = "https" if use_ssl else "http"
|
|
|
|
url = f"{protocol}://{host}:{port}{endpoint}"
|
|
|
|
|
|
|
|
|
|
|
|
# Si c'est un nom de domaine (commence par une lettre et contient un point)
|
|
|
|
|
|
|
|
# Ne pas ajouter le port (le proxy gère)
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
is_domain = bool(re.match(r'^[a-zA-Z]', host)) and '.' in host and not re.match(r'^(\d{1,3}\.){3}\d{1,3}$', host)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if is_domain:
|
|
|
|
|
|
|
|
url = f"{protocol}://{host}{endpoint}"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
url = f"{protocol}://{host}:{port}{endpoint}"
|
|
|
|
|
|
|
|
|
|
|
|
logger.info(f"Calling SH Deployer: {method} {url}")
|
|
|
|
logger.info(f"Calling SH Deployer: {method} {url}")
|
|
|
|
|
|
|
|
|
|
|
|
|