This commit is contained in:
andrea.terzani
2024-10-18 07:04:36 +02:00
2 changed files with 4 additions and 5 deletions

View File

@@ -8,13 +8,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration @Configuration
public class CorsConfig implements WebMvcConfigurer { public class CorsConfig implements WebMvcConfigurer {
@Value("${ariadne.fe.url}") @Value("${hermione.fe.url}")
private String ariadne_frontend_url; private String hermione_frontend_url;
@Override @Override
public void addCorsMappings(CorsRegistry registry) { public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") registry.addMapping("/**")
.allowedOrigins(ariadne_frontend_url) .allowedOrigins(hermione_frontend_url)
.allowedHeaders("*") .allowedHeaders("*")
.allowedMethods("GET", "POST", "PUT", "DELETE","OPTIONS"); .allowedMethods("GET", "POST", "PUT", "DELETE","OPTIONS");
} }

View File

@@ -33,5 +33,4 @@ logging.level.org.springframework.ai.chat.client.advisor=DEBUG
eureka.client.serviceUrl.defaultZone: ${EUREKA_URI:http://localhost:8761/eureka} eureka.client.serviceUrl.defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
eureka.instance.preferIpAddress: true eureka.instance.preferIpAddress: true
hermione.fe.url = * hermione.fe.url =
ariadne.fe.url = *