Add header for current Firefly III version.

This commit is contained in:
James Cole
2019-11-16 06:59:09 +01:00
parent 67db25b2cf
commit fcd6b89a43

View File

@@ -46,7 +46,12 @@ class UpdateRequest implements UpdateRequestInterface
Log::debug(sprintf('Going to call %s', $uri));
try {
$client = new Client();
$res = $client->request('GET', $uri);
$options = [
'headers' => [
'User-Agent' => sprintf('FireflyIII/%s', config('firefly.version')),
],
];
$res = $client->request('GET', $uri, $options);
} catch (GuzzleException|Exception $e) {
throw new FireflyException(sprintf('Response error from update check: %s', $e->getMessage()));
}