supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Except API routes

Open bran0h opened this issue 8 months ago • 5 comments

Hey, now i am getting unauthorized on all server/api routes... Is there a way to except specific ones (event filter method type)?

bran0h avatar Mar 13 '25 18:03 bran0h

Yes

in redirectOptions : there is an exclude property https://supabase.nuxtjs.org/get-started#redirectoptions

costeffectivesoftware avatar Apr 06 '25 07:04 costeffectivesoftware

But this shouldn't happen on default

costeffectivesoftware avatar Apr 06 '25 07:04 costeffectivesoftware

Yes

in redirectOptions : there is an exclude property https://supabase.nuxtjs.org/get-started#redirectoptions

Thank you for your answer, but this option only excludes path, not method

bran0h avatar Apr 06 '25 07:04 bran0h

if you want granular method you need to setup your own middleware. The current behavior is route based and with few options.

gabrielstuff avatar Apr 09 '25 13:04 gabrielstuff

if you want granular method you need to setup your own middleware. The current behavior is route based and with few options.

Thanks for advice, I am currently solving my issue with custom middleware. I was just wondering if there is some existing solution here.

bran0h avatar Apr 09 '25 13:04 bran0h