【发布时间】:2017-08-10 00:06:38
【问题描述】:
我使用由您的实体类自动启动的 Spring Boot API RESTful。我正在从前端网络应用程序中使用这个 apiRest,但它给了我这个错误:
请求的资源上没有“Access-Control-Allow-Origin”标头
我正在使用指定的申请属性设置 CORS 配置 here。
我的基本配置是:
endpoints.cors.allow-credentials=true
endpoints.cors.allowed-origins=*
endpoints.cors.allowed-methods=*
endpoints.cors.allowed-headers=*
我在这些变量中尝试了不同的组合,但仍然无法正常工作。有什么想法吗?
【问题讨论】:
标签: spring-boot cors