Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

expressjs allow cors for all hosts and ports

// Express.js - Allow CORS for all hosts and ports

const cors = require('cors');
app.use(cors({ origin: '*' }));

// For testing/debugging purposes only
 
PREVIOUS NEXT
Tagged: #expressjs #cors #hosts #ports
ADD COMMENT
Topic
Name
5+1 =