Include our user agent
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user