# 从 2026.1 ESR 升级到 2026.7 的发现

**URL:** <https://meta.discourse.org/t/jumping-from-2026-1-esr-to-2026-7-what-i-found/408779>\
**Category:** Support\
**Created:** [2026年七月28日 22:57 UTC](https://meta.discourse.org/t/jumping-from-2026-1-esr-to-2026-7-what-i-found/408779 "2026-07-28T22:57:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![haydenjames](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/haydenjames/32/255678_2.png) [@haydenjames](https://meta.discourse.org/u/haydenjames)\
**Post date:** [2026年七月29日 11:42 UTC](https://meta.discourse.org/t/jumping-from-2026-1-esr-to-2026-7-what-i-found/408779/6 "2026-07-29T11:42:44Z")

</div>

谢谢。另外请注意，**[discourse-health-check v1.0.4](https://meta.discourse.org/t/discourse-health-check-one-shot-cli-overview-of-your-discourse-server/404458)** 现已更新：

两项修复：

1. Discourse 已用 Pitchfork 替换了 Unicorn（2026.2 版本中 Pitchfork 成为默认选项，2026.4 版本中完全移除了 Unicorn），因此现在的 Web 服务器检查可以同时检测两者。感谢 @RGJ 在六月份指出了这个问题。

2. 服务探针曾匹配其自身的命令行。`pgrep -f <name>` 导致 pgrep 匹配到了自身，无论服务是否真正运行，检查都会通过。 **自 1.0.0 版本以来，Sidekiq 一直无条件报告“正在运行”** 。即使服务已停止，你仍会看到绿色的检查标记并收到 cron 返回的退出代码 0。这与 1.0.1 版本中 Puma 的误报根源相同，后者当时只是重命名而非真正修复。

此外，现在还会报告你的 PostgreSQL 主版本号，并标记低于 15 的版本。

* * *

如果你嵌入了 YouTube 视频，升级时还有一件事需要注意：

Discourse 默认发送 `Referrer-Policy: same-origin`，而 YouTube 会拒绝没有携带 referrer 的嵌入配置请求。你会遇到错误 153，视频将无法播放。我在十一月份也遇到了这个问题，并通过设置 Cloudflare Transform Rule 将 `Referrer-Policy` 设为 `strict-origin-when-cross-origin` 来解决：

> [@我有一个嵌入YouTube视频的问题](https://meta.discourse.org/t/i-have-issue-to-embed-youtube-video-youtube-error-153/387672/15):
>
> 我通过 Cloudflare 解决了这个问题，直到官方补丁发布为止。 对于遇到同样问题的任何人，原因是 YouTube 现在会拒绝缺少有效 Referrer-Policy 标头的嵌入请求。 我通过 Cloudflare 的转换规则添加了一个 Referrer-Policy 标头（无需 Workers）。 我所做的如下： 在 Cloudflare 中，转到规则 → 转换规则 → HTTP 响应标头修改。 创建一个新规则，选择所有传入请求，然后添加一个静态标头： Header name: Referrer-Policy Value: strict-origin-when-cross-origin 部署规则。 一旦打上补丁，我就会删除它。

我在写这篇文章时检查了更新日志。在 2026.1.5 到 2026.7.0 之间，没有任何涉及 Referrer-Policy 的提交，因此核心代码中此问题仍未修复。如果你已有变通方案，请在升级期间不要将其移除。

对于不使用 Cloudflare 的用户，可以在主题的 `head` 条目中添加以下内容来实现相同效果：  
`<meta name="referrer" content="strict-origin-when-cross-origin">`

无法编辑该主题，因为它已关闭。所以应该是“设置为静态”而不是“添加”：

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/e/2/2e2fb13576fdccdde434358dea3e073cceed0165.png)

---

_[View the full topic](https://meta.discourse.org/t/jumping-from-2026-1-esr-to-2026-7-what-i-found/408779)._
