0👍
It seems you’re only running the Redis request during the server side part. Making it lose context when client side routing happens.
export default defineNuxtRouteMiddleware(async (to, from) => {
let session = '';
if (process.server) {
session = 'has some context';
}
// server: session = 'has some context'
// client: session = ''
})
Source:stackexchange.com