I am trying to access json resources stored in a azure storage account.
//return await fetch('https://cors-anywhere.herokuapp.com/https://storage4updater.blob.core.windows.net/public-data/export.json' )
return await fetch('https://storage4updater.blob.core.windows.net/public-data/export.json') .then((res) => res.json());
The commented code works, but the uncommented one doesnt, so it must be because of cors configuration.
I read about it and tried to add this to my netlify.toml file:
[[headers]] # Define which paths this specific [[headers]] block will cover. for = "/*" [headers.values] Access-Control-Allow-Origin = "https://storage4updater.blob.core.windows.net/*"
still no success,
what is the correct way to configure this so that my website can read a json file from an external source?