config/src/main/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurer.java
public CsrfConfigurer<H> ignoringAntMatchers(String... antPatterns) {
		return new IgnoreCsrfProtectionRegistry(this.context).antMatchers(antPatterns)
				.and();
	}
public CsrfConfigurer<H> ignoringAntMatchers(String... antPatterns) {
		return new IgnoreCsrfProtectionRegistry(this.context).antMatchers(antPatterns)
				.and();
	}
<p>
Allows specifying {@link HttpServletRequest} that should not use CSRF Protection
even if they match the {@link #requireCsrfProtectionMatcher(RequestMatcher)}.
</p>

<p>
For example, the following configuration will ensure CSRF protection ignores:
</p>
<ul>
<li>Any GET, HEAD, TRACE, OPTIONS (this is the default)</li>
<li>We also explicitly state to ignore any request that starts with "/sockjs/"</li>
</ul>

<pre>
http
.csrf()
.ignoringAntMatchers("/sockjs/**")
.and()
...
</pre>

@since 4.0