Skip to content

Commit

Permalink
uri 수정 : 프론트 배포 도메인
Browse files Browse the repository at this point in the history
  • Loading branch information
김교휘 authored and 김교휘 committed Jun 11, 2024
1 parent 23c6eb1 commit fc8f634
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void addCorsMappings(CorsRegistry corsRegistry) {

corsRegistry.addMapping("/**") //모든 경로에서 매핑 진행
.exposedHeaders("Set-Cookie") //노출할 헤더값은 쿠키헤더
.allowedOrigins("https://localhost:3000", "https://cogo.life")
.allowedOrigins("https://localhost:3000", "https://cogo.life", "https://coffeego-ssu.web.app")
.allowedMethods("OPTIONS", "GET", "POST", "PUT", "DELETE")
.allowedHeaders("*")
.allowCredentials(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.cors(corsCustomizer -> corsCustomizer.configurationSource(request -> {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("https://localhost:3000", "http://localhost:8080", "https://cogo.life")); // 프론트 서버의 주소들 // 프론트 서버의 주소
configuration.setAllowedOrigins(Arrays.asList("https://localhost:3000", "http://localhost:8080", "https://cogo.life",
"https://coffeego-ssu.web.app")); // 프론트 서버의 주소들 // 프론트 서버의 주소
configuration.setAllowedMethods(Collections.singletonList("*")); // 모든 요청 메서드 허용
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(Collections.singletonList("*")); // 모든 헤더 허용
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
}

response.setStatus(HttpStatus.OK.value());
//response.sendRedirect("https://cogo.life/swagger-ui/index.html");
response.sendRedirect("https://localhost:3000/callback");
//response.sendRedirect("https://localhost:3000/callback");
response.sendRedirect("https://coffeego-ssu.web.app/callback");
}

private void addSameSiteCookie(HttpServletResponse response, String name, String value) {
Expand Down

0 comments on commit fc8f634

Please sign in to comment.