gestire il dominio ajax tra domini nel nodo js
La mia app.js ha il gestore sottostante per la pubblicazione app.all(‘/’, function (req, res, next) { res.header(“Access-Control-Allow-Origin”, “*”); res.header(“Access-Control-Allow-Headers”, “X-Requested-With”); next(); }); app.options(‘*’, cors()); var allowCrossDomain = function (req, res, next) { res.header(“Access-Control-Allow-Origin”, “*”); res.header(‘Access-Control-Allow-Methods’, ‘GET,PUT,POST,DELETE,OPTIONS’); res.header(‘Access-Control-Allow-Headers’, ‘Content-Type, Authorization, Content-Length, X-Requested-With’); next(); }; app.use(allowCrossDomain); var whitelist = [‘http://myurl.net’]; var corsOptions = { origin: function (origin, […]