supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Have an option to configure server middleware too

Open rktmatt opened this issue 9 months ago • 0 comments

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
}

rktmatt avatar Nov 19 '23 14:11 rktmatt