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 a094ecc commit bab1d50
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(List.of("https://alura-flix-api-production.up.railway.app"));
configuration.setAllowedOrigins(List.of("http://alura-flix-api-production.up.railway.app"));
configuration.setAllowedMethods(Arrays.asList("GET","POST"));
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration);
Expand Down

0 comments on commit bab1d50

Please sign in to comment.