Skip to content

Commit

Permalink
fix: localhost uri 확인 방식 변경 #357
Browse files Browse the repository at this point in the history
  • Loading branch information
jhon3242 committed Oct 24, 2024
1 parent 1f0501f commit c447c39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class RoomMemberCookieEncryptor {
private static final String DEFAULT_PATH = "/api/balances/rooms";
private static final String NONE = "None";
private static final String LAX = "Lax";
private static final String LOCALHOST = "localhost";
private static final String LOCALHOST = "http://localhost";

private final EncryptionUtils encryptionUtils;

Expand All @@ -32,7 +32,7 @@ public ResponseCookie getEncodedCookie(Object value, String requestURI) {
}

private String getSameSiteOption(String uri) {
if (uri.equals(LOCALHOST)) {
if (uri.startsWith(LOCALHOST)) {
return NONE;
}
return LAX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class 방_멤버_쿠키_암호화 {
void 로컬_환경인_경우_SameSite_None_이다() {
// given
String value = "ThisIsMySecretKe";
String uri = "localhost";
String uri = "http://localhost:3306/api";

// when
ResponseCookie encodedCookie = roomMemberCookieEncryptor.getEncodedCookie(value, uri);
Expand Down

0 comments on commit c447c39

Please sign in to comment.