为Docker Dev环境启用CORS

时间:2018-10-15 20:20:12

标签: angular api docker cors identityserver4

为我的Docker开发环境启用CORS的最佳方法是什么?我的应用程序在本地运行良好,但是一旦用户通过Identity Server登录,我的应用程序的API就无法将数据库信息提取到Angular前端。

使用nginx容器在我的应用程序中启用CORS是否有意义?似乎有大量的文档。

在Docker post-login中运行我的应用程序时,我不断从控制台收到的错误消息是:

Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5004' is therefore not allowed access. The response had HTTP status code 500.

任何帮助将不胜感激。

0 个答案:

没有答案
相关问题