Skip to content

Commit

Permalink
Chore: 프론트엔드 도메인을 추가한다.
Browse files Browse the repository at this point in the history
Chore: 프론트엔드 도메인을 추가한다.
  • Loading branch information
hseong3243 authored Feb 7, 2024
2 parents b9fac61 + 7d4b728 commit c05b409
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/data/nginx/backend.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server {
listen 80;
server_name shoutlink.me;
server_name api.shoutlink.me;

location / {
return 301 https://$server_name$request_uri;
Expand All @@ -13,14 +13,14 @@ server {

server {
listen 443 ssl;
server_name shoutlink.me;
server_name api.shoutlink.me;

location / {
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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/**");
}
Expand All @@ -35,7 +35,11 @@ public void addArgumentResolvers(List<HandlerMethodArgumentResolver> 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);
}
Expand Down

0 comments on commit c05b409

Please sign in to comment.