From f68a96c089d0ee48e4434d5e80bb10dd0800cdb9 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Mon, 5 Aug 2024 00:23:06 +0200 Subject: [PATCH] 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. --- src/main/java/com/alttd/forms/beans/WebConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/alttd/forms/beans/WebConfig.java b/src/main/java/com/alttd/forms/beans/WebConfig.java index c8b8f73..c0ff681 100644 --- a/src/main/java/com/alttd/forms/beans/WebConfig.java +++ b/src/main/java/com/alttd/forms/beans/WebConfig.java @@ -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);