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:
NotII
2025-09-01 16:31:12 +01:00
parent 29ec1be68c
commit 57c2fbdf50
5 changed files with 109 additions and 2 deletions

View File

@@ -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