H - the builder to return.public class CorsConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<CorsConfigurer<H>,H>
CorsFilter to the Spring Security filter chain. If a bean by the name of
corsFilter is provided, that CorsFilter is used. Else if
corsConfigurationSource is defined, then that CorsConfiguration is used.
Otherwise, if Spring MVC is on the classpath a HandlerMappingIntrospector is
used.| Constructor and Description |
|---|
CorsConfigurer()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
CorsConfigurer<H> |
configurationSource(org.springframework.web.cors.CorsConfigurationSource configurationSource) |
void |
configure(H http)
Configure the
SecurityBuilder by setting the necessary properties on the
SecurityBuilder. |
disable, withObjectPostProcessoraddObjectPostProcessor, and, getBuilder, init, postProcess, setBuilderpublic CorsConfigurer()
HttpSecurity.cors()public CorsConfigurer<H> configurationSource(org.springframework.web.cors.CorsConfigurationSource configurationSource)
public void configure(H http) throws Exception
SecurityConfigurerSecurityBuilder by setting the necessary properties on the
SecurityBuilder.configure in interface SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>configure in class SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>Exception