fix: apply custom_headers to API client requests
Flagsmith::ApiClient#build_headers ended with faraday.headers.merge(config.custom_headers). Faraday::Utils::Headers#merge returns a new object and does not modify the receiver, so the result was discarded and custom_headers (for example Authorization or a proxy token) never reached the API requests. The event processor already merges them correctly, so only the API client was affected.
The fix uses merge!, so configured headers are added after the default ones.
Test
New spec in spec/sdk/api_client_spec.rb builds the client with custom_headers: { 'Authorization' => ..., 'X-Proxy-Token' => ... } and checks both are on the connection while X-Environment-Key is kept. The spec asserts on headers that the old merge call discarded, so it fails before the change and passes after.
This change was prepared with the assistance of an AI coding agent.
Summary by cubic
Fixes the Flagsmith API client so configured custom_headers (such as Authorization or proxy tokens) are actually sent with API requests.
The header build previously used merge, which returns a new object without modifying the connection's headers, so custom headers were silently discarded. Switched to merge! so custom headers are applied after the defaults, and added a spec covering that behavior.