intermediateCORS: Cross-Origin Resource Sharing

What triggers a CORS preflight (OPTIONS) request, and what happens if it fails?

A preflight is triggered for 'non-simple' requests — those using methods other than GET/HEAD/POST-with-simple-content-type, or including custom headers like Authorization. If the server doesn't respond to the OPTIONS request with the correct Access-Control-Allow-* headers, the browser blocks the actual request entirely and it never reaches your controller — even though tools that don't enforce CORS (like Postman) would succeed.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

What triggers a CORS preflight (OPTIONS) request, and what happens if it fails?

Next Step

Continue to Why does @CrossOrigin on a controller sometimes still fail with Spring Security enabled?← Back to all Spring Security questions