mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 13:24:27 +00:00
fix: Improve API initialization with lazy Supabase client and validation
- Move Supabase/Stripe initialization inside GET/POST handlers for lazy loading - Add validation for missing environment variables in runtime - Improve error handling in payment intent creation - Clean up next.config.js environment variable configuration This fixes potential build-time failures when environment variables are not available during static generation.
This commit is contained in:
@@ -14,7 +14,7 @@ const nextConfig = {
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: '**.supabase.co',
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
env: {
|
||||
@@ -23,4 +23,7 @@ const nextConfig = {
|
||||
},
|
||||
compiler: {
|
||||
removeConsole: false, // Temporarily enable logs for debugging 500 errors
|
||||
module.exports = nextConfig
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
Reference in New Issue
Block a user