Rename user-agent used by the Webcal Refresh Service

Some services don't like the "crawler" inside the previous user-agent.

Closes https://github.com/nextcloud/calendar/issues/4232

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
pull/32519/head
Thomas Citharel 2 years ago
parent 6fdeb9b417
commit 424fc1b736
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

@ -192,7 +192,7 @@ class RefreshWebcalService {
$handlerStack->push(Middleware::mapRequest(function (RequestInterface $request) {
return $request
->withHeader('Accept', 'text/calendar, application/calendar+json, application/calendar+xml')
->withHeader('User-Agent', 'Nextcloud Webcal Crawler');
->withHeader('User-Agent', 'Nextcloud Webcal Service');
}));
$handlerStack->push(Middleware::mapResponse(function (ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) {
if (!$didBreak301Chain) {

Loading…
Cancel
Save