Simplify ProfileDropdown logout logic by redirecting to /logout and update nginx.conf to restrict /logout to GET and POST methods only.

This commit is contained in:
2025-06-14 10:04:54 +02:00
parent 3fc0cf1207
commit 73541a7aa3
2 changed files with 3 additions and 2 deletions

View File

@@ -16,8 +16,7 @@ export default function ProfileDropdown() {
}, [])
const handleLogout = async () => {
await fetch('/logout', { method: 'POST' })
router.push('/')
window.location.href = '/logout'
}
const name = profile.email || profile.user || 'Loading...'