public-api
public-api copied to clipboard
Requests suddenly failing because of CORS header
Request header field X-USER-TOKEN is not allowed by Access-Control-Allow-Headers in preflight response.
This happens when interacting with the API using javascript like so
const headers = {
'Content-Type': 'application/json;charset=UTF-8',
'X-USER-TOKEN': USER_TOKEN
};
return fetch(
'https://api.logz.io/v1/search',
'post',
headers,
body
);
It was working about a couple of days ago.