[Fixed] Cross-Origin Request Blocked issue help

ok current, i am using the node js side from glitch to get a schedule data into a json file. In my locale pc, i created a normal html and a simple jquery to get the JSON file from glitch and populate into my html table. This is in my locale tho.

after i tested out, i get the Cross-Origin Request Blocked issue.

can i know how do i resolve this?

the jquery i am using here from my locale to get the json file

$(function() {

var urlJSON = ‘https://my-pbmf.glitch.me/data/json/fund_tracking.json
.getJSON(urlJSON, function(data) { .each(data, function(i, item) {
if(data[i].chg > 0){
text_value = ‘

’;
} else if (data[i].chg < 0){
text_value = ‘
’;
} else {
text_value = ‘

}
$("#funds tbody").append(
“ ”
+""+data[i].date+""
+""+data[i].name+""
+""+data[i].code+""
+""+data[i].nav+""
+text_value+data[i].chg+""
+text_value+data[i].chgpercent+""
+"" )
  });

});

});

i have found the solution, by having

app.use(function(req, res, next) {
res.header(“Access-Control-Allow-Origin”, “*”); // update to match the domain you will make the request from
res.header(“Access-Control-Allow-Headers”, “Origin, X-Requested-With, Content-Type, Accept”);
next();
});

the code above before the static

// http://expressjs.com/en/starter/static-files.html
app.use(express.static(“public”));