Add CapRover deployment fix and improve env var handling
Added CAPROVER-DEPLOYMENT-FIX.md with instructions for required environment variables to prevent 500 errors. Improved validation and fallback logic for SERVER_API_URL and API_BASE_URL in server-api.ts, route.ts, and next.config.mjs to handle missing or invalid values gracefully and log warnings instead of crashing.
This commit is contained in:
@@ -21,3 +21,4 @@ API_HOSTNAME=internal-api.inboxi.ng
|
||||
# SERVER_API_URL=http://localhost:3001/api
|
||||
# API_BASE_URL=http://localhost:3001
|
||||
# API_HOSTNAME=localhost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user