Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cors in node js

// Wide listing a cors to accept a specific domain route
const cors = require('cors');

const corsOption = {
    origin: ['http://localhost:3000'],
};
app.use(cors(corsOption));
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #cors #node #js
ADD COMMENT
Topic
Name
4+5 =