Use appropriate "accept" values

This commit is contained in:
Michael 2022-03-30 14:39:53 +00:00
commit 2ca51f752d
5 changed files with 18 additions and 17 deletions

View file

@ -144,7 +144,7 @@ function redir_magic($a, $cid, $url)
}
// Test for magic auth on the target system
$serverret = DI::httpClient()->get($basepath . '/magic', [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_DEFAULT]);
$serverret = DI::httpClient()->head($basepath . '/magic', [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_HTML]);
if ($serverret->isSuccess()) {
$separator = strpos($target_url, '?') ? '&' : '?';
$target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url);