diff --git a/api/objects/auth.php b/api/objects/auth.php index 369c42f..bd46716 100644 --- a/api/objects/auth.php +++ b/api/objects/auth.php @@ -53,8 +53,7 @@ class Auth { ]; if($this->application_url !== '') { - array_push($headers, "Host: $this->application_url"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + array_push($headers, "Host: " . parse_url($this->application_url, PHP_URL_HOST)); } curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); @@ -131,8 +130,7 @@ class Auth { ]; if($this->application_url !== '') { - array_push($headers, "Host: $this->application_url"); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + array_push($headers, "Host: " . parse_url($this->application_url, PHP_URL_HOST)); } curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); @@ -243,8 +241,7 @@ class Auth { ]; if($this->application_url !== '') { - array_push($headers, "Host: " . $this->application_url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + array_push($headers, "Host: " . parse_url($this->application_url, PHP_URL_HOST)); } curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);