在我的学习应用程序中,我使用https://github.com/domenic/restify-oauth2库来实现OAuth2。这是server.js文件中的代码片段。我已将/ token端点修改为/ api / v1 / user / login'。
server.use(restify.CORS());
server.use(restify.fullResponse());
server.use(restify.authorizationParser());
server.use(restify.bodyParser({ mapParams: false }));
restifyOAuth2.ropc(server, { tokenEndpoint: "/api/v1/user/login", hooks: hooks });
从angular.js调用此API时显示
XMLHttpRequest cannot load http://localhost:8090/api/v1/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
请帮帮我