Host parse url

This commit is contained in:
aunefyren 2022-01-18 09:46:09 +01:00
parent a23ef4ba1a
commit a286b17707

View file

@ -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);