This is my Angular js part code:
$http({ method:'POST', withCredential:true, url:$scope.config.app_ws+'auth/signup', data:{user:$scope.auth} }).success(function(status, response){ console.log(response); }).error(function(status, response){ alert(response+'Bummer :( , an error occured plese retry later. '); });
This is my Node.js snippet:
var allow_cross_domain= function(req, res, next) { res.header('X-Powered-By', 'hey.heyssssssss.org'); var oneof = false; if(req.headers.origin) { res.header('Access-Control-Allow-Origin', req.headers.origin); oneof = true; } if(req.headers['access-control-request-method']) { res.header('Access-Control-Allow-Methods', req.headers['access-control-request-method']); oneof = true; } if(req.headers['access-control-request-headers']) { res.header('Access-Control-Allow-Headers', req.headers['access-control-request-headers']); oneof = true; } if(oneof) { res.header('Access-Control-Max-Age', 60 * 60 * 24 * 365); } // intercept OPTIONS method if (oneof && req.method == 'OPTIONS') { res.send(200); } else { next(); } } app.use(allow_cross_domain); app.post('/auth/signup', function (req, res) { res.send('wtff'); });
I just call POST localhost: 3000 / auth / signup from Angular to Node, but I get **CAUTION : Provisional headers are shown.** in the console is chrome.
Chrome (ATTENTION):

Firefox (NO ANSWERS for 30/60 seconds, and then a warning (): /) appears:

what could it be?
IF I use GET, everything is fine, just with POST, what I get problems, how is this possible?
sbaaaang
source share