I am beginner in nodejs. I am using axios with nodejs. In my case example website https://web.com, makes axios GET api call to (https://api.com) which redirects to authentication client(https://authclient.com) and validate the request and sets few cookies in WebBrowser, in response it gives redirection url to (https://api.com&response_state=somevalue) which serves output to the main site http://web.com
Here at the time of redirection from https://authclient.com to https://api.com is not happening on first time giving response code as 302 with throwing error as
Access to XMLHttpRequest at 'https:authclient.com&redirect_uri=http:api.com/' (redirected from 'https://api.com&response_state=somevalue') from origin 'https://web.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
After multiple refreshes the page is loading fine.
Here is the same code making call from https://web.com
axios.get("https://api.com/validate,{
headers:{"Access-Control-Allow-Origin" :"*"}
}).then(response).catch(error);
Could you please help me here to resolve CORS issue
PS: Installing CORS plug-in on Web Browser is not working