Skip to content

Commit

Permalink
Setup Cros configuration to allow between railway and spring requests (
Browse files Browse the repository at this point in the history
  • Loading branch information
LauroSilveira authored Dec 20, 2023
1 parent 59fc28d commit d758e65
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class SecurityConfigurations {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
//disable cross site request forgery
return http.csrf(AbstractHttpConfigurer::disable)
return http.csrf(csrf -> csrf.ignoringRequestMatchers("/login/**") )
//Disable Spring control and allow all endpoints
.sessionManagement(managementConfigurer ->
managementConfigurer.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
Expand All @@ -55,10 +55,10 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
}


/**
/* *//**
* Configure Cross
* @return CorsConfigurationSource
*/
*//*
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
Expand All @@ -68,7 +68,7 @@ public CorsConfigurationSource corsConfigurationSource() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration);
return source;
}
}*/


/**
Expand Down

0 comments on commit d758e65

Please sign in to comment.