refactor: 언어 정책 쿠키 i18n에서 설정, gameData External 제거

This commit is contained in:
“hyeonggkim”
2025-11-13 18:46:03 +09:00
parent 4698efc225
commit 4b7ccd8f4f
7 changed files with 98 additions and 83 deletions

View File

@@ -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)
}