feat. GR_DETAIL_01 템플릿 제작
This commit is contained in:
@@ -19,11 +19,9 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
|
||||
const languagePattern = /^\/([a-z]{2})(?:\/|$)/
|
||||
const match = to.path.match(languagePattern)
|
||||
const currentLangCode = match ? match[1] : null
|
||||
// console.log('🚀 3333~ currentLangCode:', currentLangCode)
|
||||
|
||||
// 허용된 언어 코드 목록
|
||||
const allowedLangCodes = gameDataStore.gameData.lang_codes || []
|
||||
// console.log('🚀 ~ allowedLangCodes:', allowedLangCodes)
|
||||
|
||||
// 현재 언어가 허용된 언어 목록에 없으면 404로 리다이렉트
|
||||
if (currentLangCode && !allowedLangCodes.includes(currentLangCode)) {
|
||||
|
||||
Reference in New Issue
Block a user