diff --git a/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx b/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx index 980f3f9dbcd..cf6c6c0acc4 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx @@ -633,7 +633,7 @@ async function supabase({ event, resolve }) { async function authorization({ event, resolve }) { // protect requests to all routes that start with /protected-routes - if (event.url.pathname.startsWith('/protected-routes')) { + if (event.url.pathname.startsWith('/protected-routes') && event.request.method === 'GET') { const session = await event.locals.getSession() if (!session) { // the user is not signed in @@ -695,7 +695,7 @@ async function supabase({ event, resolve }) { async function authorization({ event, resolve }) { // protect requests to all routes that start with /protected-routes - if (event.url.pathname.startsWith('/protected-routes')) { + if (event.url.pathname.startsWith('/protected-routes') && event.request.method === 'GET') { const session = await event.locals.getSession() if (!session) { // the user is not signed in