Files
OpenFlare/frontend/.env.example
T
ryan 9f15f42b47 fix(frontend): keep browser API on same-origin rewrites in dev
Document that NEXT_PUBLIC_WAVELET_BACKEND_URL must stay unset for local
next dev so axios hits /api/* and Next rewrites proxy to the backend.
2026-08-03 21:25:22 +08:00

17 lines
592 B
Bash

# 前端 URL
WAVELET_FRONTEND_URL=http://localhost:3000
# 后端 URL(服务端与 next.config rewrites 使用,不会暴露到浏览器)
WAVELET_BACKEND_URL=http://localhost:8000
# 浏览器侧 API base URL
# - 本地 `pnpm dev`:务必留空或不设置,请求走同源 `/api/*`,由 Next rewrites 反代到 WAVELET_BACKEND_URL
# - 静态导出 / 浏览器需直连后端(如部分 WebSocket 场景)时再设置,例如:
# NEXT_PUBLIC_WAVELET_BACKEND_URL=http://localhost:8000
# Session Cookie
WAVELET_SESSION_COOKIE_NAME=wavelet_session_id
# 环境
NODE_ENV=development