尽管我已经配置了属性文件,但仍然出现错误:
我还创建了一个扩展ContainerRequestFilter的@Provider,但它从来没有到达那里。
blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
我还创建了一个扩展ContainerRequestFilter的@Provider,但它从来没有到达那里。
application.properties
# Configuration file
quarkus.http.port=9090
quarkus.http.cors=true
quarkus.http.origins=http://localhost:4200, localhost:9090
quarkus.http.headers=accept, authorization, content-type, x-requested-with
quarkus.http.methods=GET, OPTIONS
编辑
17:11:09 WARN [io.qu.config]] (build-3) Unrecognized configuration key "quarkus.http.methods" provided
17:11:09 WARN [io.qu.config]] (build-3) Unrecognized configuration key "quarkus.http.headers" provided
17:11:09 WARN [io.qu.config]] (build-3) Unrecognized configuration key "quarkus.http.origins" provided