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
Description
During preflight request OPTIONS call is returning 405
.
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
Labels
No labels