forked from EvergreenCrypto/docker-finance
container: finance: fetch: prices: add User-Agent
CoinGecko now returns error 403 without a "descriptive" User-Agent
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// docker-finance | modern accounting for the power-user
|
// docker-finance | modern accounting for the power-user
|
||||||
//
|
//
|
||||||
// Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
// Copyright (C) 2021-2026 Aaron Fiore (Founder, Evergreen Crypto LLC)
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@@ -154,6 +154,7 @@ namespace dfi\prices\internal
|
|||||||
protected function request_impl(string $url, array $header): mixed
|
protected function request_impl(string $url, array $header): mixed
|
||||||
{
|
{
|
||||||
$headers = array(
|
$headers = array(
|
||||||
|
'User-Agent: docker-finance /' . $this->get_env()->get_env('API_VERSION'),
|
||||||
'Accept: application/json',
|
'Accept: application/json',
|
||||||
'Content-Type: application/json',
|
'Content-Type: application/json',
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user