본문 바로가기

ErrorLog

크롬 SameSite 에러 : A cookie associated with a cross-site resource

# 문제발생

 

WMS 데이터를 받아오던 중 cross-site 쿠키 에러가 발생했다. 

 

A cookie associated with a cross-site resource at site.com was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at www.chromestatus.com/feature/5088147346030592 and www.chromestatus.com/feature/5633521622188032.

 

 

# 해결과정

 

1. 간단히 이해하자면 Chrome SameSite 이슈로, 이전에는 클라이언트 브라우저에 쿠키를 심을 수 있었는데 보안상의 이유로 쿠키 정책이 바뀌면서 현재 사이트의 쿠키만 심도록 바뀐것.  SameSite=none(defalut) 또는 SameSite=Lax 또는 SameSite=Strick 로 지정해주도록 변경되었다.

(참조 사이트:  https://web.dev/samesite-cookie-recipeshttps://developer.mozilla.org/ko/docs/Web/HTTP/Headers/Set-Cookie )

 

2. 크롬 브라우저에 입력하고, SameSite by default cookiesCookies without SameSite must be secure Enabled 로 변경하고 Relunch 한다. 

chrome://flags

(참조 사이트: https://brocess.tistory.com/263