From 429ce20ab24171cf8964c31d19cbab845968eba6 Mon Sep 17 00:00:00 2001 From: luna156 Date: Fri, 23 Aug 2024 10:41:12 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20https=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cloudfront를 이용하여 https 연결을 구현했기에 https 연결 제거 - 사설 ssl 인증서로는 브라우저단에서 막음 --- .../podoarrival/PodoArrivalApplication.java | 32 +++++++++---------- src/main/resources/application.yml | 12 +++---- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java b/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java index 5c708b8..7a8b830 100644 --- a/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java +++ b/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java @@ -37,20 +37,20 @@ public void addCorsMappings(CorsRegistry registry) { }; } - @Bean - public ServletWebServerFactory servletContainer() { - // Enable SSL Trafic - TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() { - @Override - protected void postProcessContext(Context context) { - SecurityConstraint securityConstraint = new SecurityConstraint(); - securityConstraint.setUserConstraint("CONFIDENTIAL"); - SecurityCollection collection = new SecurityCollection(); - collection.addPattern("/*"); - securityConstraint.addCollection(collection); - context.addConstraint(securityConstraint); - } - }; - return tomcat; - } +// @Bean +// public ServletWebServerFactory servletContainer() { +// // Enable SSL Trafic +// TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() { +// @Override +// protected void postProcessContext(Context context) { +// SecurityConstraint securityConstraint = new SecurityConstraint(); +// securityConstraint.setUserConstraint("CONFIDENTIAL"); +// SecurityCollection collection = new SecurityCollection(); +// collection.addPattern("/*"); +// securityConstraint.addCollection(collection); +// context.addConstraint(securityConstraint); +// } +// }; +// return tomcat; +// } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index aeb48a6..c2b42ce 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,12 +6,12 @@ server: max: 200 # 작업 스레드 # accept-count: 500000 # 요청 대기 큐 크기 # connection-timeout: 600000 # 연결 타임아웃 (밀리초) - ssl: - enabled: true - key-store: ../arrival-server.p12 - key-store-password: teampodo - key-store-type: PKCS12 - key-alias: softeerbootcamp4th +# ssl: +# enabled: true +# key-store: ../arrival-server.p12 +# key-store-password: teampodo +# key-store-type: PKCS12 +# key-alias: softeerbootcamp4th spring: application: From fb5f12950f146dfcd01bb05e6df53614712c668d Mon Sep 17 00:00:00 2001 From: luna156 Date: Fri, 23 Aug 2024 10:41:24 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20cors=20origin=EC=97=90=20cloudfront?= =?UTF-8?q?=20domain=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/softeer/podoarrival/PodoArrivalApplication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java b/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java index 7a8b830..67ae416 100644 --- a/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java +++ b/src/main/java/com/softeer/podoarrival/PodoArrivalApplication.java @@ -30,7 +30,7 @@ public WebMvcConfigurer corsConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:8000", "https://www.hyundaiseltos.site") // 허용할 도메인 + .allowedOrigins("http://localhost:8000", "https://www.hyundaiseltos.site", "https://d3u0wfxb13l271.cloudfront.net") // 허용할 도메인 .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // 허용할 HTTP 메소드 .allowedHeaders("*"); // 허용할 헤더 }