Relative Content

Tag Archive for next.jscookiesmiddleware

Next middleware doesn’t pass cookies returned from server

I have a Django backend that returns an httpOnly cookie on successful login. This cookie is required for accessing protected routes in the Next app. I have a middleware that checks if a protected route is being accessed – if it is, then an api call is made to ensure that the user can access said page. Here’s the code for that –