The approved answer to this question is not valid.
You need to set headers on your server-side code
app.use((req,res,next)=>{
res.setHeader('Acces-Control-Allow-Origin','*');
res.setHeader('Acces-Control-Allow-Methods','GET,POST,PUT,PATCH,DELETE');
res.setHeader('Acces-Contorl-Allow-Methods','Content-Type','Authorization');
next();
})