返回 - 没有"访问控制允许源"标头



我正在尝试使用注册新用户

Backand.signup(firstName, lastName, username, password, password2);

但我最终得到了:

XMLHttpRequest cannot load https://api.backand.com/1/user/signup. 
No 'Access-Control-Allow-Origin' header is present on the 
requested resource. Origin 'http://localhost:8100' is therefore 
not allowed access. 
The response had HTTP status code 504.

使用这种设置,这个端点过去一直可以工作,但今天似乎停止了工作。AFAIK,我在这个网址上达到了我的所有端点"https://api.backand.com/执行GET、PUT、POST等,它们都按预期工作。这是唯一一个显示这种行为的。

除了/1/user/signup之外,其他端点怎么能在这个url上正常工作?

如有任何帮助,我们将不胜感激。

正如您在github的Backandsdk代码中看到的,

注册功能接受电子邮件而不是用户名。

代码是:

self.signup = function (firstName, lastName, email, password,confirmPassword, parameters) {
        return BackandAuthService.signup(firstName, lastName, email,
                              password, confirmPassword, parameters);
};

因此,请确保您发送的是电子邮件,而不是简单的用户名。

另一个问题可能是,如果您发送的密码少于6个字符。

您可以在chrome的网络选项卡中找到详细的错误。

相关内容

最新更新