supabase
supabase copied to clipboard
Have an option to configure server middleware too
Is your feature request related to a problem? Please describe.
The redirect option with redirectOptions comes in handy to have protected routes. However, it doesn't protect server/ routes, for example if we want to restrict API calls with serverSupabaseUser
Describe the solution you'd like
The same as redirectOptions but for the server. For example :
// old
redirect: boolean
// new
redirect: {client: boolean, server: boolean}
redirectOptions: {
// unchanged options ...
server: {
// same option format
}
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.