client side navigation to a server side page will run the authorization middleware in the browser
hello all, I'm facing a problem with forcing SSR for a page all the time. From the documentation I found to achive this I should use the '.server.vue' prependix in the page's file name, which works like a charm, but the middleware that checks authorization is running in the browser only, I have this line in the middleware: 'if (import.meta.client) return ', so I can reach the site even tough the user I'm logged in doesn't have the rights to see it. Could you help me how can I configure the middleware to run on the serverside in this case?
2 Replies
I'll provide some more info for my question might help to resolve it 🙂 On the picture you can see my folder structure
the auth,global.ts looks like this (there are some dummy variables)
I made a more detailed description of the issue, but I was unable to close/delete this one: https://discord.com/channels/473401852243869706/1258398982347034757