【发布时间】:2017-05-15 05:32:18
【问题描述】:
我正在尝试将 wordpress 作为我的 angularjs 应用程序的后端,因此我将插件 rest-api 与 jwt-auth 一起使用 所以尝试登录时出现以下错误
XMLHttpRequest cannot load http://localhost/back/wp-json/jwt-auth/v1/token. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://imider.ma' is therefore not allowed access. The response had HTTP status code 500.
我知道我必须添加 CROS 访问权限,但我不熟悉 wordpress,有什么帮助吗?
【问题讨论】: