Skip to content

Conversation

EmilianoSanchez
Copy link
Contributor

Usage example to add a custom header to SDK /auth requests:

  const ffClient = initialize(
    sdkKey, {
    identifier: id,
  });
  
  ffClient.registerAPIRequestMiddleware(([url, options]) => {
    if (url.includes('/client/auth')) {
      options.headers['X-Custom-Header'] = 'CustomValue';
    }
    return [url, options];
  });

@EmilianoSanchez EmilianoSanchez changed the title Fix: apply client.registerAPIRequestMiddleware to SDK auth requests that were missing it Fix: apply client.registerAPIRequestMiddleware to SDK auth requests Aug 15, 2025
@conormurray95 conormurray95 merged commit bf6cf7a into harness:main Aug 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants