Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

CORS issue : OPTIONS call is returning 405 #19

Open
@mhmahmoodalam

Description

@mhmahmoodalam

During preflight request OPTIONS call is returning 405
launchdarklycorserror
.
You could try to add below code to any React Component to reproduce it. The URL should be require authorization and call should be made from outside launch-darkly domain( for preflight validation to work).

The document says i need to add below two for authenticated CORS:

  • AuthoricationKey
  • withCredentials : true

componentDidMount() {
const response = fetch('https://URL', {
method: 'GET',
headers: new Headers({
Authorization: API_KEY,
'Content-type': 'application/json'
}),
credentials: 'include'
});
if (response.ok)
console.log( response.json());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions