GH-230: Disabled CSRF for Kinesis sample
Fixes https://github.com/spring-cloud/spring-cloud-stream-samples/issues/230
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package demo.security;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
||||
@Configuration
|
||||
public class SecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
|
||||
return httpSecurity.csrf().disable().build();
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import org.springframework.cloud.stream.annotation.StreamListener;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import demo.repository.OrderRepository;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -34,6 +35,7 @@ import demo.repository.OrderRepository;
|
||||
* @author Artem Bilan
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class OrderStreamConfiguration {
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
Reference in New Issue
Block a user