Fix inconsistent path for lang_type cookie

Context::setLangType()에서 생성하는 lang_type 쿠키와
자바스크립트 setLangType()에서 생성하는 lang_type 쿠키의 path가 달라
라이믹스를 서브폴더에 설치한 경우 충돌이 일어나는 문제 해결
This commit is contained in:
Kijin Sung 2020-12-13 19:28:37 +09:00
parent fcfb89edea
commit b5cdd1212e

View file

@ -759,7 +759,11 @@ function doChangeLangType(obj) {
}
}
function setLangType(lang_type) {
XE.cookie.set("lang_type", lang_type, { path: "/", expires: 3650 });
var baseurl = XE.URI(default_url).pathname();
if (baseurl !== '/') {
XE.cookie.remove('lang_type', { path: '/' });
}
XE.cookie.set('lang_type', lang_type, { path: baseurl, expires: 365 });
}
/* 미리보기 */