You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2/ In app.js i need to modify "app.configure('development', 'production', function()" for
app.configure('development', 'production', function() {
app.use(express.logger('dev'));
app.use(allowCrossDomain);
});
The text was updated successfully, but these errors were encountered:
Hi,
When I try to send a request POST with jquery I have a problem with the cross domain.
So I had find and I have find his solution:
1/ In app.js i need to add :
//CORS middleware
var allowCrossDomain = function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
next();
}
2/ In app.js i need to modify "app.configure('development', 'production', function()" for
app.configure('development', 'production', function() {
app.use(express.logger('dev'));
app.use(allowCrossDomain);
});
The text was updated successfully, but these errors were encountered: