Redirect based on cookie value

Thanks for the feedback @jimniels

Yes you are right. You will need the edge functions to handle the logic of setting and unsetting the cookies.

I’m not sure edge functions are the right full solution here

Based on your scenario your project will end up getting more complicated if you have different functions for just handling basic logic adding to overheads.

Not every scenario requires serverless with redirects configurations.

However instead of using the redirects configuration an alternative will be to use an Express application with Netlify functions.
Express allows you to run a Node.js backend that can enable you to do routing, redirects, setting/unsetting cookies, e.t.c easily.

Kindly check the link below to learn how to use Express framework with Netlify’s serverless functions