我试图在前端使用AngularJS向运行Sails JS(NodeJS)的远程服务器发出请求,但是我收到了这个'null'来源错误:
我的请求看起来像这样:
有什么想法吗?
XMLHttpRequest cannot load http://remoteserver:1337/login/. The 'Access-Control-Allow-Origin' header contains the invalid value ''. Origin 'null' is therefore not allowed access.
我的请求看起来像这样:
我的请求大概是这样的:
$http.post('http://remoteserver:1337/login/', { email: userData.email, password: userData.password});
有什么想法吗?