diff --git a/src/main/java/com/entrevistador/gateway/config/security/SecurityConfiguration.java b/src/main/java/com/entrevistador/gateway/config/security/SecurityConfiguration.java index cc5410b..6bc84bf 100644 --- a/src/main/java/com/entrevistador/gateway/config/security/SecurityConfiguration.java +++ b/src/main/java/com/entrevistador/gateway/config/security/SecurityConfiguration.java @@ -55,13 +55,6 @@ public SecurityWebFilterChain securityFilterChain(@NonNull ServerHttpSecurity ht .permitAll() .anyExchange().authenticated() ) - .cors(corsSpec -> corsSpec.configurationSource(exchange -> { - var config = new org.springframework.web.cors.CorsConfiguration(); - config.setAllowedOrigins(java.util.List.of("*")); - config.setAllowedMethods(java.util.List.of("*")); - config.setAllowedHeaders(java.util.List.of("*")); - return config; - })) .build(); } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 389bbc0..3b32e2b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -39,7 +39,7 @@ spring: corsConfigurations: '[/**]': allow-credentials: true - allowed-origins: ${ORIGINS:http://localhost:${server.port},http://localhost:3000} + allowed-origins: ${ORIGINS:http://localhost:${server.port},${FRONT_HOST},http://localhost:3000} allowed-headers: '*' allowed-methods: '*' discovery: