Skip to content

Commit

Permalink
chore(cors): 필요없는 호스트 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobhboy committed Apr 18, 2024
1 parent ac0e3c8 commit 4465a28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ public class CorsConfig implements WebMvcConfigurer {
private static final String ALLOWED_METHODS = "*";
private static final String MAIN_SERVER_DOMAIN = "https://sickgyun.com";
private static final String FRONTEND_LOCALHOST = "http://localhost:3000";
private static final String HTTPS_FRONTEND_LOCALHOST = "https://localhost:3000";

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping(ALLOW_ALL_PATH)
.allowedMethods(ALLOWED_METHODS)
.allowedOrigins(
MAIN_SERVER_DOMAIN,
FRONTEND_LOCALHOST,
HTTPS_FRONTEND_LOCALHOST
FRONTEND_LOCALHOST
)
.allowCredentials(true)
.exposedHeaders(LOCATION, SET_COOKIE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class InterceptorConfig implements WebMvcConfigurer {
private static final String ALLOWED_METHODS = "*";
private static final String MAIN_SERVER_DOMAIN = "https://sickgyun.com";
private static final String FRONTEND_LOCALHOST = "http://localhost:3000";
private static final String HTTPS_FRONTEND_LOCALHOST = "https://localhost:3000";

private final JwtParser jwtParser;
private final AuthUpdater authUpdater;
Expand All @@ -36,8 +35,7 @@ public void addCorsMappings(CorsRegistry registry) {
.allowedMethods(ALLOWED_METHODS)
.allowedOrigins(
MAIN_SERVER_DOMAIN,
FRONTEND_LOCALHOST,
HTTPS_FRONTEND_LOCALHOST
FRONTEND_LOCALHOST
)
.allowCredentials(true)
.exposedHeaders(LOCATION, SET_COOKIE);
Expand Down

0 comments on commit 4465a28

Please sign in to comment.