Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Access to XMLHttpRequest at from origin HTTP localhost:3000 has been blocked by CORS policy

const cors = require('cors');
const corsOptions ={
    origin:'http://localhost:3000', 
    credentials:true,            //access-control-allow-credentials:true
    optionSuccessStatus:200
}
app.use(cors(corsOptions));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Access #XMLHttpRequest #origin #HTTP #blocked #CORS #policy
ADD COMMENT
Topic
Name
5+6 =