# CDN 和多站点

**URL:** https://meta.discourse.org/t/cdn-and-multisite/78693
**Category:** Self-hosting
**Tags:** hosting
**Created:** [2018年一月22日 22:45 UTC](https://meta.discourse.org/t/cdn-and-multisite/78693 "2018-01-22T22:45:53Z")
**Posts on this page:** 3
**Page:** 1

<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: [2018年一月22日 22:45 UTC](https://meta.discourse.org/t/cdn-and-multisite/78693/1 "2018-01-22T22:45:53Z")

</div>

似乎所有多站点主机都共享相同的 `DISCOURSE_CDN_URL`。是否有什么机制让它们能够共享同一个区域？

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年一月22日 22:54 UTC](https://meta.discourse.org/t/cdn-and-multisite/78693/2 "2018-01-22T22:54:02Z")

</div>

Yeah we always add the host name to the CDN requests. All you need to do is make sure you don’t eat query strings from the CDN origin.

---

<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: [2018年一月23日 00:55 UTC](https://meta.discourse.org/t/cdn-and-multisite/78693/3 "2018-01-23T00:55:55Z")

</div>

> [@sam](#):
>
> All you need to do is make sure you don’t eat query strings from the CDN origin.

Ah. I see. It **is** magic. The CSS assets are working. The only thing that’s **not** working is `user_avatar/sitename/username/xx/yy_1.png`.
