Add CORS support for production server

Updated the CORS configuration to include the production server URL. This change ensures that requests from the production environment are properly handled.
This commit is contained in:
Teriuihi 2024-08-05 00:23:06 +02:00
parent 8cb22aae08
commit f68a96c089

View File

@ -16,6 +16,7 @@ public class WebConfig implements WebMvcConfigurer { //TODO this can be done wit
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("http://localhost:3000")
.allowedOrigins("https://forms.alttd.com")
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("*")
.allowCredentials(true);