Skip to content
Sharp

Spring Security · interview question

Which of the following filters in the Spring Security Filter Chain is primarily responsible for ensuring that requests originate from trusted sources and not from cross-site scripts?

Multiple choiceEasychapter-17-curatedpremiumspring-securityspring-security-filter-chain
Choose one answer
Answer and explanation

Correct answer

A. CORS

Why

CORS (Cross-Origin Resource Sharing) is a filter that handles requests from different origins to ensure they are allowed. It is vital for preventing cross-origin attacks.

Test yourself on Spring Security

A free test with instant, explained results. No account needed.

Start free test
All Spring Security questions →