From 3cfe3449e3e8a31308e26a16d3a550a90fbbf304 Mon Sep 17 00:00:00 2001 From: Anata Arisa Date: Tue, 7 Nov 2023 20:31:23 +0700 Subject: [PATCH] vinh/add domain for cors --- .../com/group1/drawingcouseselling/ApplicationWebConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/drawingcouseselling/src/main/java/com/group1/drawingcouseselling/ApplicationWebConfig.java b/api/drawingcouseselling/src/main/java/com/group1/drawingcouseselling/ApplicationWebConfig.java index 5943e44c..0b891cd9 100644 --- a/api/drawingcouseselling/src/main/java/com/group1/drawingcouseselling/ApplicationWebConfig.java +++ b/api/drawingcouseselling/src/main/java/com/group1/drawingcouseselling/ApplicationWebConfig.java @@ -21,7 +21,7 @@ protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { public CorsFilter corsFilter() { CorsConfiguration corsConfiguration = new CorsConfiguration(); corsConfiguration.setAllowCredentials(true); - corsConfiguration.setAllowedOrigins(Arrays.asList("http://localhost:3000")); + corsConfiguration.setAllowedOrigins(Arrays.asList("http://localhost:3000", "http://anataarisa.hopto.org:3000")); corsConfiguration.setAllowedHeaders(Arrays.asList("Origin", "Access-Control-Allow-Origin", "Content-Type", "Accept", "Authorization", "Origin, Accept", "X-Requested-With", "Access-Control-Request-Method", "Access-Control-Request-Headers"));