- Issue created by @phuang07
- 🇦🇺Australia ivrh
Hi @phuang07
Have you filed a Pull Request with algolia/algoliasearch-client-php? I'm questioning whether changing vendors just for this single feature is justified.
@ivrh, they don't want to add a custom header to the default client config and that makes sense - https://github.com/algolia/algoliasearch-client-php/pull/713#issuecommen....
They suggest modifying the config for the client and this is a good solution. We need to wait for 📌 Add a way to access the algoliaClient Needs review and then we can use the hook alter to add own headers in custom modules:
use Algolia\AlgoliaSearch\Config\SearchConfig; /** * Implements hook_search_api_algolia_search_client_config_alter(). */ function my_module_search_api_algolia_search_client_config_alter(SearchConfig $config) { $config->setDefaultHeaders([ 'Custom-Header' => 'any value', ]); }
- Status changed to Closed: works as designed
3 months ago 1:23pm 12 August 2024