Skip to content

Commit

Permalink
Merge pull request #29 from mju-likelion/feature/login-cookie-error-#24
Browse files Browse the repository at this point in the history
Feature/#24 로그인 시 Cookie 설정 문제
  • Loading branch information
Dh3356 authored Feb 27, 2024
2 parents fc9848a + abe37c5 commit 09377dd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.mjulikelion.baker.filter.JwtFilter;
import org.mjulikelion.baker.util.security.JwtTokenProvider;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.server.Cookie.SameSite;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -74,6 +75,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws
.logoutSuccessHandler((request, response, authentication) -> {
ResponseCookie cookie = ResponseCookie.from(ACCESS_TOKEN, "")
.maxAge(ZERO)
.sameSite(String.valueOf(SameSite.NONE))
.secure(true)
.path("/")
.build();
response.addHeader("Set-Cookie", cookie.toString());
Expand Down

0 comments on commit 09377dd

Please sign in to comment.