I need to read a csv data file directly from github in my Vue app (in development mode),
datal() {
const data = d3.csv("https://raw.githubusercontent.com/example/examples.csv")
}
but I have a Preflight Did Not Succeed Error.
Any ideas?
thanks, F
I tried to set the vue.config.js file, but it doesn't work:
module.exports = {
devServer: {
host: "0.0.0.0",
port: 8070,
compress: true,
headers: { "Access-Control-Allow-Origin": "*" },
proxy: {
"^https://raw.githubusercontent.com": {
target: "https://raw.githubusercontent.com",
changeOrigin: true,
ws: true,
headers: {
"Content-Type": "application/text;charset=UTF-8",
"Access-Control-Allow-Origin": "https://raw.githubusercontent.com"
}
}
}
},