Spring Security · interview question
When configuring Spring Security, which filter should be placed first in the filter chain to handle pre-flight requests?
Multiple choiceHardchapter-17-curatedpremiumspring-securityspring-security-filter-chain
Answer and explanation
Correct answer
D. CORS Filter
Why
The CORS Filter should be placed first to handle pre-flight requests, which check permissions for cross-origin requests before the main request is processed.
Test yourself on Spring Security
A free test with instant, explained results. No account needed.
More Spring Security questions
- In a stateless JWT token, what component ensures the token's integrity and prevents tampering?
- How does Spring Security handle a request identified as a potential CSRF attack?
- Why is separating authentication from authorization important in a real system?
- What does Spring Security's Authentication Filter primarily do?
- In the context of BCrypt, what does increasing the work factor achieve?
- Which of the following filters in the Spring Security Filter Chain is primarily responsible for ensuring that requests…