fix(auth): restore middleware, fix setup redirect loop, and add next.config rewrites proxying Supabase requests
All checks were successful
Staging Build / build (push) Successful in 3m27s
All checks were successful
Staging Build / build (push) Successful in 3m27s
This commit is contained in:
@@ -25,6 +25,23 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
];
|
||||
},
|
||||
async rewrites() {
|
||||
const supabaseUrl = (process.env.SUPABASE_URL || "http://supabase-kong:8000").replace(/\/$/, "");
|
||||
return [
|
||||
{
|
||||
source: '/auth/v1/:path*',
|
||||
destination: `${supabaseUrl}/auth/v1/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/rest/v1/:path*',
|
||||
destination: `${supabaseUrl}/rest/v1/:path*`,
|
||||
},
|
||||
{
|
||||
source: '/storage/v1/:path*',
|
||||
destination: `${supabaseUrl}/storage/v1/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user