# 如何放宽内容安全策略

**URL:** <https://meta.discourse.org/t/how-to-relax-content-security-policy/244459>\
**Category:** Development\
**Created:** [2022年十一月5日 04:51 UTC](https://meta.discourse.org/t/how-to-relax-content-security-policy/244459 "2022-11-05T04:51:32Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2022年十一月11日 10:54 UTC](https://meta.discourse.org/t/how-to-relax-content-security-policy/244459/5 "2022-11-11T10:54:13Z")

</div>

> [@titusc](#):
>
> 我面临的挑战是，我有一个自动化安装 Discourse 的方法，并且希望使用相同的方法来搭建开发、UAT 和生产环境

那不是个好主意。这永远行不通。开发环境是绝对不同的，因为它有预编译的资产和许多其他使开发不可能的东西。除非你正在开发插件，否则你根本不需要开发环境。所以，如果是这种情况，那么你的开发环境可以是一个 Docker 安装，它只是不被称为这里的开发环境。

你想按照标准安装中的描述，使用 Docker 来启动你的暂存和生产环境。

---

_[View the full topic](https://meta.discourse.org/t/how-to-relax-content-security-policy/244459)._
