when using @ CrossOrigin (origins= "*")
, there is a response header Access-Control-Allow-Origin: *
. At this time, the front end setting withCredential
will report an error Failed to load http://localhost:8080/test: Response to preflight request doesn"t pass access control check: The value of the "Access-Control-Allow-Origin" header in the response must not be the wildcard" * "when the request"s credentials mode is" include". Can Origin "http://localhost:3000" is therefore not allowed access.
set response headers for all requested websites, such as localhost:3000
access Access-Control-Allow-Origin: localhost:3000
.