Skip to content

Commit

Permalink
fix: uri -> url 변경 #357
Browse files Browse the repository at this point in the history
  • Loading branch information
jhon3242 committed Oct 24, 2024
1 parent c447c39 commit 7836c32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public InitialRoomResponse isInitialRoom(@PathVariable @Positive Long roomId) {
private void setEncryptCookie(HttpServletRequest request,
HttpServletResponse response,
Object cookieValue) {
String requestURI = request.getRequestURI();
ResponseCookie encodedCookie = roomMemberCookieEncryptor.getEncodedCookie(cookieValue, requestURI);
String requestURL = request.getRequestURL().toString();
ResponseCookie encodedCookie = roomMemberCookieEncryptor.getEncodedCookie(cookieValue, requestURL);
response.addHeader(HttpHeaders.SET_COOKIE, encodedCookie.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public RoomMemberCookieEncryptor(EncryptionUtils encryptionUtils, @Value("${cook
this.rejoinKey = rejoinKey;
}

public ResponseCookie getEncodedCookie(Object value, String requestURI) {
public ResponseCookie getEncodedCookie(Object value, String requestURL) {
String encrypt = encryptionUtils.encrypt(String.valueOf(value));
return ResponseCookie.from(rejoinKey, encrypt)
.httpOnly(true)
.secure(true)
.path(DEFAULT_PATH)
.sameSite(getSameSiteOption(requestURI))
.sameSite(getSameSiteOption(requestURL))
.build();
}

Expand Down

0 comments on commit 7836c32

Please sign in to comment.