refactor: 언어 정책 쿠키 i18n에서 설정, gameData External 제거
This commit is contained in:
@@ -68,8 +68,7 @@ const cache = new LRUCache({
|
||||
* @param baseDomain - 기본 도메인
|
||||
*/
|
||||
function setFinalLocaleCookie(event: any, finalLocale: string, baseDomain: string) {
|
||||
console.log("🚀 ~ 구어 구어 setFinalLocaleCookie:============", finalLocale)
|
||||
setCookie(event, 'LOCALE', finalLocale.toUpperCase(), {
|
||||
setCookie(event, 'LOCALE', finalLocale.toLowerCase(), {
|
||||
domain: baseDomain,
|
||||
path: '/',
|
||||
maxAge: 60 * 60 * 24 * 365, // 1년 (초 단위)
|
||||
@@ -191,7 +190,7 @@ export default defineEventHandler(async event => {
|
||||
|
||||
initLangCodes = initResponse?.value?.lang_codes || null
|
||||
initDefaultLocale = initResponse?.value?.default_lang_code || null
|
||||
console.log('🚀 ~ 000111 initLangCodes:', initLangCodes)
|
||||
console.log('🚀 ~ initLangCodes:===========', initLangCodes)
|
||||
} catch (error) {
|
||||
console.error('init gameData load error:', error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user