aded753de3
* fix(frontend): unify gateway-config localhost fallback for prod (#2705) `getGatewayConfig()` only fell back to localhost defaults when `NODE_ENV === "development"`, while `next.config.js` always falls back to `127.0.0.1:8001`. Running `make start` (which sets NODE_ENV=production via `next start`) without `DEER_FLOW_INTERNAL_GATEWAY_BASE_URL` / `DEER_FLOW_TRUSTED_ORIGINS` therefore caused zod to throw inside SSR layouts and surfaced as a 500. Drop the NODE_ENV gating and use localhost defaults everywhere — the "force explicit config in prod" intent should be enforced by deployment templates (docker-compose already sets both vars), not by request-time crashes. Document the two vars in both .env.example files and add unit coverage for the dev/prod env-unset paths. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update internalGatewayUrl in gateway config tests --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
22 lines
1.1 KiB
Bash
22 lines
1.1 KiB
Bash
# Since the ".env" file is gitignored, you can use the ".env.example" file to
|
|
# build a new ".env" file when you clone the repo. Keep this file up-to-date
|
|
# when you add new variables to `.env`.
|
|
|
|
# This file will be committed to version control, so make sure not to have any
|
|
# secrets in it. If you are cloning this repo, create a copy of this file named
|
|
# ".env" and populate it with your secrets.
|
|
|
|
# When adding additional environment variables, the schema in "/src/env.js"
|
|
# should be updated accordingly.
|
|
|
|
# Backend API URLs (optional)
|
|
# Leave these commented out to use the default nginx proxy (recommended for `make dev`)
|
|
# Only set these if you need to connect to backend services directly
|
|
# NEXT_PUBLIC_BACKEND_BASE_URL="http://localhost:8001"
|
|
# NEXT_PUBLIC_LANGGRAPH_BASE_URL="http://localhost:2024"
|
|
|
|
# Server-only Gateway wiring used by SSR (auth checks, /api/* rewrites).
|
|
# Defaults to localhost — only override for non-local deployments.
|
|
# DEER_FLOW_INTERNAL_GATEWAY_BASE_URL="http://localhost:8001"
|
|
# DEER_FLOW_TRUSTED_ORIGINS="http://localhost:3000,http://localhost:2026"
|