axios.get("https://url.example.com/b/478L", {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
}
}).then((response) => console.log(response.data))
.catch((error) => console.log(error))
My URL is different.
Error:
Access to XMLHttpRequest at 'https://url.example.com/b/478L' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.