optimizely / react-sdk

React SDK for Optimizely Feature Experimentation and Optimizely Full Stack (legacy)
https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-react-sdk
Apache License 2.0
89 stars 36 forks source link

Optizely instace with custom headers #56

Open wellyal opened 4 years ago

wellyal commented 4 years ago

I should be able to send a custom header (eg Authorization) within the request considering the fact that I can point my instance to another endpoint which may need other kinds of information

const optimizely = createInstance({
    sdkKey: 'development',
    headers: { Authorization: "23984712348213g48b8sgd8f" } // suggestion
    datafileOptions: {
      urlTemplate: 'http://localhost:3001/optimizely/datafile/%s',
    },
  })
Tamara-Barum commented 1 year ago

Internal Ticket: [FSSDK-8655]

junaed-optimizely commented 3 weeks ago

UPDATE:

This seems like a good addition to the SDK. Nothing to do in React however. Underlying JS SDK needs to implement this. We can keep the issue open, and get back to it when the update gets done in the JS side.

Thanks!