# Correct config for cross-domain access to Open edX API

**URL:** <https://discuss.openedx.org/t/correct-config-for-cross-domain-access-to-open-edx-api/2584>\
**Category:** Site Operators\
**Tags:** api, juniper\
**Created:** [June 29, 2020, 8:36am UTC](https://discuss.openedx.org/t/correct-config-for-cross-domain-access-to-open-edx-api/2584 "2020-06-29T08:36:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Joan\_Rodriguez](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/joan_rodriguez/32/2013_2.png) [@Joan\_Rodriguez](https://discuss.openedx.org/u/Joan_Rodriguez)\
**Post date:** [December 29, 2021, 12:35am UTC](https://discuss.openedx.org/t/correct-config-for-cross-domain-access-to-open-edx-api/2584/3 "2021-12-29T00:35:10Z")

</div>

Hello Andreas,

Today I encountered a similar problem, and I struggled to find a solution on the documentation and forums.

I finally managed to fix it by enabling CORS in the /edx/etc/lms.yml config file. Specifically, I changed  
CORS\_ORIGIN\_ALLOW\_ALL: true  
FEATURES:  
…  
ENABLE\_CORS\_HEADERS: true

I assume you can also whitelist your domain by modifying:  
CORS\_ORIGIN\_WHITELIST:

Best  
Joan

---

_[View the full topic](https://discuss.openedx.org/t/correct-config-for-cross-domain-access-to-open-edx-api/2584)._
