diff --git a/app/Integrations/Credits.php b/app/Integrations/Credits.php index 3bbd7332..4a65dab2 100644 --- a/app/Integrations/Credits.php +++ b/app/Integrations/Credits.php @@ -60,7 +60,7 @@ class Credits { return $this->cache->remember('version', 2880, function () { return json_decode((new Client())->get($this->url, [ - 'headers' => ['Accept' => 'application/json'], + 'headers' => ['Accept' => 'application/json', 'User-Agent' => defined('CACHET_VERSION') ? 'cachet/'.constant('CACHET_VERSION') : 'cachet'], ])->getBody(), true); }); } diff --git a/app/Integrations/Releases.php b/app/Integrations/Releases.php index 3d0649b7..1c0ff64f 100644 --- a/app/Integrations/Releases.php +++ b/app/Integrations/Releases.php @@ -68,7 +68,7 @@ class Releases public function latest() { $release = $this->cache->remember('version', 720, function () { - $headers = ['Accept' => 'application/vnd.github.v3+json']; + $headers = ['Accept' => 'application/vnd.github.v3+json', 'User-Agent' => defined('CACHET_VERSION') ? 'cachet/'.constant('CACHET_VERSION') : 'cachet']; if ($this->token) { $headers['OAUTH-TOKEN'] = $this->token;