While debugging a CORS issue I am experiencing I\'ve found the following behaviour. Chrome makes the following OPTIONS preflight request (rewritten in CURL by Chrome itself)
I added this as an answer because I couldn't format it well for the top voted answer.
I found this post helpful as well: How to handle HTTP OPTIONS with Spring MVC?
DispatchServlet must be configured to pass along options request, or else it never reaches the mapped request:
...
yourServlet
org.springframework.web.servlet.DispatcherServlet
dispatchOptionsRequest
true
1
...