To test an application, I created a sample GeoJSON on my AWS and passing its URL to the GeoJSON Layer JS API to access it - however I am facing CORS issue.
For now I am able to bypass it with disabling Chrome security, however, I wanted to know if there is any means to pass appropriate Request headers to fix this for final.
I tried:
var options = {
query: {
f: "json"
},
responseType: "json",
mode: "no-cors"
};
and also
var options = {
query: {
f: "json"
},
responseType: "json",
headers: {
"Access-Control-Allow-Headers": "*"
}
};
when I am using require(["esri/request"] but to no success - its still throwing the same error. What am I missing here?