i tried to call '/api/v1/groups ’ on React using axios.
i added ‘http://localhost:8080’ in API-trusted origins.
but cors error keeps show up
this is my axios instance
const client: Axios = axios.create({
baseURL: ‘https://dev-88058956.okta.com/’,
headers: {
‘Content-Type’: ‘application/json’,
Authorization: SSWS ${api_token},
‘Access-Control-Allow-Origin’: *,
Accept: ‘application/json’,
‘Access-Control-Allow-Credentials’: ‘true’,
},
withCredentials: true,
});
client.get(api/v1/groups);
what am i missing?
thanks.