You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server.use((req,res,next)=>{// Website you wish to allow to connectres.setHeader('Access-Control-Allow-Origin','*');// Request methods you wish to allowres.setHeader('Access-Control-Allow-Methods','GET');// Request headers you wish to allowres.setHeader('Access-Control-Allow-Headers','X-Requested-With,content-type');// Set to true if you need the website to include cookies in the requests sent// to the API (e.g. in case you use sessions)res.setHeader('Access-Control-Allow-Credentials',true);// Pass to next layer of middlewarenext();});
The text was updated successfully, but these errors were encountered:
Allow configuration options to control this:
The text was updated successfully, but these errors were encountered: