Merge pull request #46079 from nextcloud/fix/well-known-checks

fix(settings): make trailing slash for caldav/carddav redirects optional
This commit is contained in:
Côme Chilliet 2024-06-25 10:24:01 +02:00 committed by GitHub
commit 9496ce6c7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,7 +63,7 @@ class WellKnownUrls implements ISetupCheck {
if (!$works && $response->getStatusCode() === 401) {
$redirectHops = explode(',', $response->getHeader('X-Guzzle-Redirect-History'));
$effectiveUri = end($redirectHops);
$works = str_ends_with($effectiveUri, '/remote.php/dav/');
$works = str_ends_with(rtrim($effectiveUri, '/'), '/remote.php/dav');
}
}
// Skip the other requests if one works