Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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));
 
PREVIOUS NEXT
Tagged: #cors #node #js
ADD COMMENT
Topic
Name
9+2 =