Fix www redirect and document Cloudflare redirect loop

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
eric
2026-07-11 11:36:37 -05:00
parent 460da1a6a3
commit 4c2101a87a
2 changed files with 15 additions and 1 deletions

View File

@@ -1,4 +1,8 @@
nomadro.com, www.nomadro.com {
www.nomadro.com {
redir https://nomadro.com{uri} permanent
}
nomadro.com {
encode gzip
reverse_proxy 127.0.0.1:4003
}

View File

@@ -24,6 +24,16 @@ www.nomadro.com A 107.173.30.245
若使用 Cloudflare需关闭代理灰云或配置 Origin 指向该 IP否则 Caddy 无法自动签发 HTTPS 证书。
### 若出现 ERR_TOO_MANY_REDIRECTS
1. Cloudflare DNS 中**删除所有 AAAA 记录**IPv6 走 CF 代理会导致循环)
2. 确认 `nomadro.com``www` 均为 **DNS only灰云**A 记录指向 `107.173.30.245`
3. 若开启 CF 代理SSL 模式必须选 **Full (strict)**,不能选 Flexible
4. 浏览器清除 nomadro.com 的 Cookie或用无痕窗口访问
5. Windows 刷新 DNS`ipconfig /flushdns`
`www.nomadro.com` 会自动 301 跳转到 `nomadro.com`
## 首次部署
```bash