fix(openresty): preserve origin error status on custom error pages

Remove error_page '=' form that adopted the internal URI status (often 200)
and left ngx.status as 0. Resolve the original code from $status/upstream
and set ngx.status before rendering the HTML body.
This commit is contained in:
ryan
2026-08-06 15:45:41 +08:00
parent ba1c9222c2
commit f650214bbb
3 changed files with 57 additions and 12 deletions
+1
View File
@@ -29,6 +29,7 @@ sidebar: false
### 修复
- 修复源站错误页在边缘返回 HTTP 200、页面状态码显示异常(如 0)的问题:错误响应现在正确透传上游状态码,并在页面中展示真实状态码。
- 修复 Agent 在配置已对齐但磁盘校验和不一致时,Pages 等对账成功后仍保留 `LastError` 的问题,避免偶发网络失败被健康事件长期显示为「活动中」且无法自动恢复。
### 改进