# 主题组件无效的“扩展内容安全策略”值

**URL:** <https://meta.discourse.org/t/theme-component-invalid-extend-content-security-policy-value/350861>\
**Category:** Bug\
**Created:** [2025年二月6日 12:26 UTC](https://meta.discourse.org/t/theme-component-invalid-extend-content-security-policy-value/350861 "2025-02-06T12:26:27Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![kelv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kelv/32/524739_2.png) [@kelv](https://meta.discourse.org/u/kelv)\
**Post date:** [2025年二月11日 04:09 UTC](https://meta.discourse.org/t/theme-component-invalid-extend-content-security-policy-value/350861/6 "2025-02-11T04:09:16Z")

</div>

嘿 @michaeld，我已将 [FIX: invalid CSP directive sources should allow site to boot with valid CSP directives by tyb-talks · Pull Request #31256 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/31256) 的修复合并到最新的 `main` 分支。现在该修复也已在 `tests-passed` 和 `stable` 分支中可用。

此 CSP 指令处理行为的更改源于 Rails 中一个回传的安全补丁——我在 PR 中对此进行了更详细的说明。🙂 Discourse 现在将在构建 CSP 之前过滤掉这些值。

关于安全模式，由于它只禁用 JavaScript 部分，因此在这里无济于事，因为这些数据是在服务器端处理的。

---

_[View the full topic](https://meta.discourse.org/t/theme-component-invalid-extend-content-security-policy-value/350861)._
