I need some router guard implementation in my nextjs app.
The official answer is middleware, which runs on the server.
It gives me a chance to write my logic in one place and no useless api call or render .
But this brings more latency.
If I want to solve this problem, I need to use edge function, which is supported by limited suppliers. My team use Google cloud function (sadly no supported edge)
Are you guys using the middleware for the router guard?
Which points attract you?