react-sdk icon indicating copy to clipboard operation
react-sdk copied to clipboard

Optizely instace with custom headers

Open wellyal opened this issue 5 years ago • 2 comments

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',
    },
  })

wellyal avatar Jul 24 '20 20:07 wellyal

Internal Ticket: [FSSDK-8655]

Tamara-Barum avatar Jul 19 '23 15:07 Tamara-Barum

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!

junaed-optimizely avatar Nov 04 '24 13:11 junaed-optimizely