# 使用 apex 域名（CORS）下载字体失败

**URL:** <https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649>\
**Category:** Support\
**Created:** [2025年四月20日 00:37 UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649 "2025-04-20T00:37:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Stonley](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stonley/32/512519_2.png) [@Stonley](https://meta.discourse.org/u/Stonley)\
**Post date:** [2025年四月20日 00:37 UTC](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649/1 "2025-04-20T00:37:02Z")

</div>

您好！我有一个 3.5.0.beta3-dev Discourse 实例，地址是 [https://wingsoffire.forum](https://wingsoffire.forum)。该实例设置在 www 子域名下，但我正在使用 Cloudflare CNAME 展平来使用根域名。

除了字体无法下载外，其他一切都按预期工作。使用 LibreWolf 137.0.1-1 时会显示此错误：

```plaintext
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘*, https://www.wingsoffire.forum, https://wingsoffire.forum’)。
downloadable font: download failed (font-family: "Roboto" style:normal weight:700 stretch:100 src index:0): bad URI or cross-site access not allowed source: https://www.wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18

```

在标准的 Ungoogled Chromium 135.0.7049.84 上：

```plaintext
Access to font at 'https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18' (redirected from 'https://www.wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18') from origin 'https://wingsoffire.forum' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, https://www.wingsoffire.forum, https://wingsoffire.forum', but only one is allowed.
GET https://wingsoffire.forum/fonts/Roboto-Bold.woff2?v=0.0.18 net::ERR_FAILED 200 (OK)

```

---

_[View the full topic](https://meta.discourse.org/t/font-download-fails-using-apex-domain-cors/362649)._
