I am trying to configure CORS globally via WebMvcConfigurerAdapter shown below. To test I am hitting my API endpoint via a small node app I created to emulate a
I was trying to configure CORS globally via WebMvcConfigurerAdapter shown yours with log. And I found log message but it got error like
Access to XMLHttpRequest at 'myurl' from origin 'some origin' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Controll-Allow-Origin' header is presnet on the requested resource.
My Case was also good at @CrossOrigin but not in globally configure. I hope this will be helped.
The reason is web.xml.
1.
I have
2.
I removed
It works.