Next.js Discord

Discord Forum

Using Next.JS Middleware to rewrite to a different static shell

Unanswered
Bull Arab posted this in #help-forum
Open in Discord
Avatar
Bull ArabOP
We have a website where we have a few variants, one of them being for logged out users and one for logged in users.

We want to take advantage of static rendered, so I'm wondering if it's possible to use middleware to detect the log in status and then rewrite to a different static shell. So then this work would happen all at the Edge and stay with in the Edge Cache since static shells are kept on the Edge Cache.

0 Replies