Files
jiang13-bbs/frontend/.env.example

25 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 前端环境变量示例:复制为 .env.local(本地)或在部署平台配置
# 客户端交互请求走同源相对路径 /api/*(由 next.config.ts rewrite 代理),
# 以下地址仅用于 SSR 服务端渲染与 middleware 静默轮转直连后端。
# SSR/浏览器构建均可读;本地开发默认值即 http://localhost:3001
NEXT_PUBLIC_API_URL=http://localhost:3001
# 仅服务端可见(middleware 与 SSR 优先使用)。
# 生产构建【必须】显式配置;缺省会直接失败,禁止烤进 localhost。
# Docker 官方镜像构建期注入 http://api:3001。
# BACKEND_URL=http://localhost:3001
# 与后端 DEV_MODE 对齐:true 时 cookie 无 __Host- 前缀。
# 本地 next start 对着 DEV_MODE=true 的 Go 时请设为 true,避免 cookie 名分叉。
# 官方 Docker 写死 false。
DEV_MODE=true
# 可选。官方 Docker 构建会写入与仓库根 VERSION 相同的值;本地 dev 可不设。
# NEXT_PUBLIC_APP_VERSION=0.1.0
# 访客看到的公开 origin(Canonical / sitemap)。与 Go CORS 的 SITE_URL 相同。
# 不要填 BACKEND_URL / 容器名。本地不设则开发态回退 http://localhost:3000;
# 生产缺失或非法时不会回退 localhost,而是省略 Canonical。
# SITE_URL=http://localhost:3000