3 ms·
you can always fetch data from any domain, iff that server sets the correct CORS headers, unless I'm misunderstanding. https://developer.mozilla.org/en-US/docs
by tkzed49 3y ago
you can always fetch data from any domain, iff that server sets the correct CORS headers, unless I'm misunderstanding.
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
- Timja 3y agoMost servers don't set a CORS header though. So usually it does not work in the browser. Try this in your console while not on Reddit: fetch('https://www.reddit.com/.json')