initial
This commit is contained in:
7
apps/client/middleware/01.slash.global.ts
Normal file
7
apps/client/middleware/01.slash.global.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||
if (to.path === '/')
|
||||
return navigateTo('/projects')
|
||||
|
||||
if (to.path !== '/' && to.path.endsWith('/'))
|
||||
return navigateTo(to.path.slice(0, -1))
|
||||
})
|
||||
Reference in New Issue
Block a user