I try to make a simple GET call with axios.
Lets say I have the following code:
import axios from 'axios'
axios.get('https://www.wikipedia.org/')
The browser (Firefox) logs the following error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.wikipedia.org/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
In the Developer Toolbar - Network
there is the right response.
When I copy the request as cURL and past it in the console it works.
Is this a problem with axios
, firefox
or wikipedia.org
?
How do I fix this problem?