🔧 웹훅 URL을 HTTPS로 수정
Some checks failed
🚀 Deploy - Demo / deployment (push) Has been cancelled

- 웹훅 URL을 https://admin.youtooplay.com/webhook로 변경
- Nginx 리버스 프록시 설정 파일 추가
- 배포 가이드 업데이트
This commit is contained in:
2025-10-01 01:47:51 +09:00
parent f331b52e64
commit 83b162d2bd
713 changed files with 98449 additions and 38378 deletions

23
middleware/auth.ts Normal file
View File

@@ -0,0 +1,23 @@
export default defineNuxtRouteMiddleware((to, from) => {
// 로그인 페이지와 회원가입 페이지는 인증 체크 제외
if (to.path === '/login' || to.path === '/register') {
return
}
// 서버 사이드에서는 쿠키로 체크
if (process.server) {
const token = useCookie('auth-token')
if (!token.value) {
return navigateTo('/login')
}
return
}
// 클라이언트 사이드에서는 쿠키와 localStorage 체크
const token = useCookie('auth-token')
// 토큰이 없으면 로그인 페이지로 리다이렉션
if (!token.value) {
return navigateTo('/login')
}
})

11
middleware/guest.ts Normal file
View File

@@ -0,0 +1,11 @@
export default defineNuxtRouteMiddleware((to, from) => {
// 클라이언트 사이드에서만 실행
if (process.server) return
const token = useCookie('auth-token')
// 이미 로그인된 사용자는 대시보드로 리다이렉션
if (token.value) {
return navigateTo('/dashboard')
}
})