Skip to content

Commit

Permalink
fix: added api server domain to allowed origins (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyY00n authored Oct 20, 2024
1 parent 1f09cc6 commit a018cd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/src/main/java/zipgo/common/config/WebConfig.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package zipgo.common.config;

import java.util.List;

import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
Expand All @@ -27,6 +26,7 @@ public class WebConfig implements WebMvcConfigurer {
private static final String DEV_SERVER_DOMAIN = "https://dev.zipgo.pet";
private static final String FRONTEND_LOCALHOST = "http://localhost:3000";
private static final String HTTPS_FRONTEND_LOCALHOST = "https://localhost:3000";
private static final String API_SERVER_DOMAIN = "https://api.zipgo.pet";

private final AuthInterceptor authInterceptor;
private final LoggingInterceptor loggingInterceptor;
Expand All @@ -40,7 +40,8 @@ public void addCorsMappings(CorsRegistry registry) {
MAIN_SERVER_DOMAIN,
DEV_SERVER_DOMAIN,
FRONTEND_LOCALHOST,
HTTPS_FRONTEND_LOCALHOST
HTTPS_FRONTEND_LOCALHOST,
API_SERVER_DOMAIN
)
.allowCredentials(true)
.exposedHeaders(LOCATION, SET_COOKIE);
Expand Down

0 comments on commit a018cd8

Please sign in to comment.