From 236ebaf69a0f7fd2ceac96dc9160c447f7185870 Mon Sep 17 00:00:00 2001 From: hseong3243 Date: Wed, 7 Feb 2024 21:52:14 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20nginx=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=97=90=20=EB=8F=84=EB=A9=94=EC=9D=B8=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/data/nginx/backend.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/data/nginx/backend.conf b/scripts/data/nginx/backend.conf index 16b2a1d..671ae55 100644 --- a/scripts/data/nginx/backend.conf +++ b/scripts/data/nginx/backend.conf @@ -1,6 +1,6 @@ server { listen 80; - server_name shoutlink.me; + server_name api.shoutlink.me; location / { return 301 https://$server_name$request_uri; @@ -13,7 +13,7 @@ server { server { listen 443 ssl; - server_name shoutlink.me; + server_name api.shoutlink.me; location / { proxy_pass http://backend; From d16c69c6c32e20cff59c7c92d1858d918b71ed06 Mon Sep 17 00:00:00 2001 From: hseong3243 Date: Wed, 7 Feb 2024 22:43:29 +0900 Subject: [PATCH 2/3] =?UTF-8?q?choe:=20ssl=20=EC=9D=B8=EC=A6=9D=EC=84=9C?= =?UTF-8?q?=20=EC=9E=AC=EB=B0=9C=EA=B8=89=20=EC=82=AC=ED=95=AD=EC=9D=84=20?= =?UTF-8?q?nginx=20=EC=84=A4=EC=A0=95=20=ED=8C=8C=EC=9D=BC=EC=97=90=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/data/nginx/backend.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/data/nginx/backend.conf b/scripts/data/nginx/backend.conf index 671ae55..761b065 100644 --- a/scripts/data/nginx/backend.conf +++ b/scripts/data/nginx/backend.conf @@ -19,8 +19,8 @@ server { proxy_pass http://backend; } - ssl_certificate /etc/letsencrypt/live/shoutlink.me/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/shoutlink.me/privkey.pem; + ssl_certificate /etc/letsencrypt/live/shoutlink.me-0001/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/shoutlink.me-0001/privkey.pem; ssl_prefer_server_ciphers on; } From 7d4b728eb0265ba290aa6fc93a51832d251aa325 Mon Sep 17 00:00:00 2001 From: hseong3243 Date: Wed, 7 Feb 2024 22:47:39 +0900 Subject: [PATCH 3/3] =?UTF-8?q?choe:=20=ED=94=84=EB=A1=A0=ED=8A=B8?= =?UTF-8?q?=EC=97=94=EB=93=9C=20=EB=8F=84=EB=A9=94=EC=9D=B8=20cors=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=EC=97=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/seong/shoutlink/global/config/WebConfig.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/seong/shoutlink/global/config/WebConfig.java b/src/main/java/com/seong/shoutlink/global/config/WebConfig.java index ddae833..493ecd7 100644 --- a/src/main/java/com/seong/shoutlink/global/config/WebConfig.java +++ b/src/main/java/com/seong/shoutlink/global/config/WebConfig.java @@ -22,7 +22,7 @@ public class WebConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor( - new JwtAuthenticationInterceptor(jwtAuthenticationProvider, authenticationContext)) + new JwtAuthenticationInterceptor(jwtAuthenticationProvider, authenticationContext)) .order(1) .addPathPatterns("/api/**"); } @@ -35,7 +35,11 @@ public void addArgumentResolvers(List resolvers) @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/api/**") - .allowedOrigins("http://localhost:3000", "https://shoutlink.me") + .allowedOrigins( + "http://localhost:3000", + "https://shoutlink.me", + "https://www.shoutlink.me", + "https://shout-link-front.vercel.app") .allowedMethods("GET", "POST", "PATCH", "DELETE", "OPTIONS") .allowCredentials(true); }