Skip to content

Optizely instace with custom headers #56

Open
@wellyal

Description

@wellyal

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

Activity

Tamara-Barum

Tamara-Barum commented on Jul 19, 2023

@Tamara-Barum

Internal Ticket: [FSSDK-8655]

junaed-optimizely

junaed-optimizely commented on Nov 4, 2024

@junaed-optimizely
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wellyal@Tamara-Barum@mikechu-optimizely@junaed-optimizely

        Issue actions

          Optizely instace with custom headers · Issue #56 · optimizely/react-sdk