# לאן עלי ללכת כדי להגדיר את משתנה הסביבה \`DISCOURSE\_ENABLE\_CORS\`?

**URL:** <https://meta.discourse.org/t/where-i-should-go-to-set-the-discourse-enable-cors-env-variable/249632>\
**Category:** Product Support\
**Created:** [21 בדצמבר,‏ 2022,‏ 11:45pm UTC](https://meta.discourse.org/t/where-i-should-go-to-set-the-discourse-enable-cors-env-variable/249632 "2022-12-21T23:45:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mikeguo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikeguo/32/278830_2.png) [@mikeguo](https://meta.discourse.org/u/mikeguo)\
**Post date:** [23 בדצמבר,‏ 2022,‏ 12:22am UTC](https://meta.discourse.org/t/where-i-should-go-to-set-the-discourse-enable-cors-env-variable/249632/5 "2022-12-23T00:22:36Z")

</div>

Thank you for your reply. Sorry for not being clear enough in my previous message.

I’m using Discourse hosted instance and going to embed Discourse to my website, and when I try to get `contentDoument` object of the iframe of embedded Discourse, I found the cross origin limit. In admin setting page, I noticed there is the “cors origins” setting as shown in the topic picture. Then I add my testing origin url, but not worked. And I noticed the tip that is `The DISCOURSE_ENABLE_CORS env variable must be set to true to enable CORS.` However, I can’t find where to set DISCOURSE\_ENABLE\_CORS in admin settings.  
I want to know how to set DISCOURSE\_ENABLE\_CORS, or if my cross-domain configuration is not working, is it related to this setting.

---

_[View the full topic](https://meta.discourse.org/t/where-i-should-go-to-set-the-discourse-enable-cors-env-variable/249632)._
