SyntaxFix
Write A Post
Hire A Developer
Questions
Use this.
app.use((req,res, next)=>{ res.setHeader('Access-Control-Allow-Origin',"http://localhost:3000"); res.setHeader('Access-Control-Allow-Headers',"*"); res.header('Access-Control-Allow-Credentials', true); next(); });