Spring Security · interview question
Which Spring Security filter is responsible for handling CORS preflight requests?
Multiple choiceMediumchapter-17-curatedpremiumspring-securityspring-security-filter-chain
Answer and explanation
Correct answer
C. CorsFilter
Why
The CorsFilter is specifically designed to handle CORS preflight requests, ensuring that cross-origin HTTP requests are handled securely. It checks the origin of requests and determines if the server should allow them.
Test yourself on Spring Security
A free test with instant, explained results. No account needed.
More Spring Security questions
- Which of the following best describes the purpose of the Spring Security Filter Chain?
- Why does the CSRF token in Spring Security matter in this design?
- In Spring Security, what role does the SecurityContextHolder play in handling authentication?
- Why do teams use a stateless authentication mechanism such as JWT in Spring Security in production code?
- Which component of the Spring Security Filter Chain is responsible for preventing unauthorized access to protected…
- Why is it important to use prepared statements in Java when dealing with SQL queries?