I am running a cross origin request from an index.html
script tag. I receive a CORS error because
Reason: CORS header 'Access-Control-Allow-Origin' missing
I've read about CORS quite a bit. I am aware that a server needs to set the Access Control Header to *
for my request to really succeed.
Yet if I run GET <URL>
from the Linux Cli I get the expected JSON response.
But how are these two requests different? Is there any way to get it working from the browser?
API: https://www.fishwatch.gov/api/ (no code or anything)
I am trying to understand what is the reason for this?