My goal is to set a cookie called "user" in a server plugin which can be read by middleware that can redirect users that do not have certain attributes. I have the cookie set correctly by the server plugin which can be read by my Navbar component. What I am not able to do yet is write the middleware correctly to read the cookie. I tried using global middleware, but if that gets used the cookie data is never set correctly in the server plugin, and of course the global middleware does not detect it either.
What am I doing wrong?