supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Have an option to configure server middleware too

Open rktmatt opened this issue 2 years ago • 1 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

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.

github-actions[bot] avatar May 06 '25 13:05 github-actions[bot]