Preventing ISR Caching for Authenticated Users on Vercel with Nuxt
We're using Nuxt's hybrid rendering for our app, specifying different ISR settings for public pages and our login area to ensure up-to-date data. Here's our setup:
To redirect authenticated users from public pages to the login area, we use a global middleware:
`
When an authenticated user accesses a public page exactly when the 3600-second cache expires, they are correctly redirected as intended. However, Vercel caches this redirect action, causing even unauthenticated users to be redirected.
Question
How can we prevent or bypass ISR caching for authenticated users, or avoid caching these redirects on Vercel? Is there a specific configuration or approach that could help in this scenario?
Is there also a way to bypass all ISR caching in some scenarios globally (e.g. when user is authenticated)
Thanks for your help! π
1 Reply
Hi, I'm having the exact same issue. Did you find a solution?