So, I am trying to add data to a json file on github and I am getting this error code ` // Read in the existing data from the file const url = 'https://username.github.io/path/tiles.json';
axios.get(url)
.then(response => {
const data = response.data;
// Add the new data to the existing data
data.push(newData);
// Write the updated data back to the file
axios.post(url, data, {
headers: {
'Content-Type': 'application/json'
}
})
.then(response => {
message_correct('Data added successfully.');
})
.catch(error => {
message_error('Error adding data.', error);
});
})
.catch(error => {
message_error('Error reading data.', error);
});`
this is the error: Access to XMLHttpRequest at 'https://username.github.io/path/tiles.json' from origin 'http://127.0.0.1:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I want to add data to the file