Skip to content

Commit

Permalink
Revert "Temporarily disable csrf (#493)" (#495)
Browse files Browse the repository at this point in the history
This reverts commit b44cb50.
  • Loading branch information
JoepdeJong authored May 27, 2024
1 parent b44cb50 commit 307972e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/ch/wisv/events/ChConnectConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest;
import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService;
Expand Down Expand Up @@ -70,7 +69,7 @@ public class ChConnectConfiguration {
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.cors(Customizer.withDefaults())
.csrf(AbstractHttpConfigurer::disable)
.csrf(Customizer.withDefaults())
.authorizeHttpRequests((authorize) -> authorize
.requestMatchers("/administrator/**").hasRole("ADMIN")
.requestMatchers("/", "/management/health").permitAll()
Expand Down

0 comments on commit 307972e

Please sign in to comment.