关于“early hint header”全局设置的问题

你好 :waving_hand:

当这个 EXPERIMENTAL: preconnect and dns-prefetch resource hints for CDN doma… · discourse/discourse@36cdb14 · GitHub 站点设置可用时,我在我的站点上启用了它。之后,此提交已在此处 DEV: Consolidate experimental 'Link' header implementations (#26377) · discourse/discourse@1cc8c72 · GitHub 更改为全局设置。

我已经启用了全局设置 early_hint_header_mode 的 preconnect,但我看到还有一个全局设置 early_hint_header_mode 的 prefetch。是否可以同时启用两者,或者是我有什么误解?:thinking:

谢谢 :slightly_smiling_face:

1 个赞

tuning early_hint_header_mode 的唯一方法是通过全局设置。

这通常通过为容器设置环境变量来完成:

DISCOURSE_EARLY_HINT_MODE 可以是 preconnectpreloadprefetch 或留空。

自托管用户将在其 app.yml 文件中进行设置。

此设置只能有一个值。自托管用户可以通过以下方式验证其值:

./launcher enter app
rails c

> GlobalSetting.early_hint_header_mode

Early hints 是一个相当复杂的设置,因为代理需要支持它们,而许多代理并不支持。

2 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.