我应该如何配置cors策略,使其接受json?
CORS策略阻止了从源'http://localhost:8080/todo/savePerson‘访问http://localhost:8080/todo/savePerson 'http://localhost:4200’:
请求头字段内容类型在飞行前响应中不被访问控制允许标头所允许.
application.properties:
quarkus.http.cors=true
quarkus.http.cors.origins=http://localhost:4200
quarkus.http.cors.headers=accept, origin, authorization, content-type, x-requested-with
quarkus.http.cors.methods=GET,POST,OPTIONS
发布于 2020-02-28 12:22:18
是的,我用邮递员/浏览器进行了测试。我刚刚删除了剩下的,现在它对我有用了。
quarkus.http.cors=true
https://stackoverflow.com/questions/60415889
复制相似问题