0.0.8.3
This commit is contained in:
@@ -46,6 +46,10 @@ nano .env
|
||||
DATABASE_URL="postgresql://user:password@localhost:5432/family_tree"
|
||||
|
||||
# NextAuth 配置
|
||||
# ⚠️ 重要: NEXTAUTH_URL 必须与用户在浏览器中访问的URL完全一致!
|
||||
# 如果用户通过 http://115.190.235.230:8006 访问,则设置为:
|
||||
# NEXTAUTH_URL="http://115.190.235.230:8006"
|
||||
# 如果用户通过 http://115.190.235.230:3000 访问,则设置为:
|
||||
NEXTAUTH_URL="http://115.190.235.230:3000"
|
||||
NEXTAUTH_SECRET="your-production-secret-key-here"
|
||||
|
||||
@@ -60,6 +64,13 @@ SMTP_FROM="cftservice@163.com"
|
||||
NODE_ENV="production"
|
||||
```
|
||||
|
||||
**⚠️ 关于 NEXTAUTH_URL 的重要说明**:
|
||||
- 如果配置错误,会导致重定向循环 (ERR_TOO_MANY_REDIRECTS)
|
||||
- 必须包含协议 (http:// 或 https://)
|
||||
- 必须包含用户实际访问的端口号
|
||||
- 不要使用 localhost 或 127.0.0.1
|
||||
- 详细的故障排查请参考 `REDIRECT_LOOP_FIX.md`
|
||||
|
||||
### 4. 执行部署
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user