【发布时间】:2017-03-02 23:54:45
【问题描述】:
我有一个非常简单的 Angular 应用程序,可以在 http://localhost:3000/ 上使用 Gulp 运行
lagom 开发的微服务在http://localhost:9000 上运行。
Lagom 是基于 Akka 和 PlayFramework 构建的框架,带有
build.sbt
现在,当我想从微服务中获取列表时:
XMLHttpRequest cannot load http://localhost:9000/api/users/list.
No 'Access-Control-Allow-Origin'
header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
我应该在哪里启用 CORS?在角度或Lagom上?应该在build.sbt 上定义吗?
【问题讨论】:
标签: angularjs sbt cors akka lagom