From 731fb204e17869f7127d4a4240474d033c8ed0ed Mon Sep 17 00:00:00 2001 From: Daniel Subiabre Date: Thu, 5 Feb 2026 17:22:09 +0100 Subject: [PATCH] feat: declare default User-Agent header value via config --- config/packages/framework.yaml | 5 +++++ src/Service/Nominatim/NominatimService.php | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index abc9e1b..387064a 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -23,6 +23,11 @@ framework: default_locale: '%env(APP_LOCALE)%' + http_client: + default_options: + headers: + 'User-Agent': 'Platoniq Goteo-v4-API' + when@test: framework: test: true diff --git a/src/Service/Nominatim/NominatimService.php b/src/Service/Nominatim/NominatimService.php index 3d7bc25..5ec3db8 100644 --- a/src/Service/Nominatim/NominatimService.php +++ b/src/Service/Nominatim/NominatimService.php @@ -24,7 +24,6 @@ class NominatimService ) { $this->httpClient = $httpClient->withOptions([ 'base_uri' => self::NOMINATIM_BASE_URI, - 'headers' => ['User-Agent' => 'goteo/v4'], ]); }