open-feature / js-sdk-contrib

OpenFeature Providers and Hooks for JavaScript
https://openfeature.dev
Apache License 2.0
38 stars 37 forks source link

feat: Add interceptors to flagd options. #894

Closed connyay closed 6 months ago

connyay commented 6 months ago

This PR

This change enables passing interceptors to the flagd-web provider which can be leveraged to add extra headers to outgoing requests.

Notes

I'm working on bootstrapping a flagd deployment, and I have flagd behind a proxy that requires a session header. I didn't see an existing way to mutate requests.

beeme1mr commented 6 months ago

@connyay, makes sense, thanks!