# DISCOURSE\_ENABLE\_CORS not impacting Nginx config

**URL:** https://meta.discourse.org/t/discourse-enable-cors-not-impacting-nginx-config/34434
**Category:** Self-hosting
**Created:** [10월 13, 2015, 2:07오전 UTC](https://meta.discourse.org/t/discourse-enable-cors-not-impacting-nginx-config/34434 "2015-10-13T02:07:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ckamps](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@ckamps](https://meta.discourse.org/u/ckamps)
#### Post date: [10월 13, 2015, 2:07오전 UTC](https://meta.discourse.org/t/discourse-enable-cors-not-impacting-nginx-config/34434/1 "2015-10-13T02:07:09Z")

</div>

I was able to modify the `/etc/nginx/conf.d/discourse.conf` file to include several `Access-Control-...` headers to avoid the `Unknown error` during log in when using SSO.

Now I want to trigger these Nginx settings via `app.yml` so that we don’t have to manually modify the Nginx config. However, when I specify the following settings in the environment section of `app.yml` and bootstrap via `launcher`, the Nginx config does not get updated.

Any idea as to what I am missing?

```
 ## Enable Cross-origin resource sharing so that SSO works properly
 DISCOURSE_ENABLE_CORS: true
 DISCOURSE_CORS_ORIGIN: '*'

```

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [10월 13, 2015, 3:53오후 UTC](https://meta.discourse.org/t/discourse-enable-cors-not-impacting-nginx-config/34434/2 "2015-10-13T15:53:52Z")

</div>

The CORS headers are added via Rack, not nginx. The config should not be updated by adding those settings, but your site should start serving the correct headers.

---

<div class="post-metadata">

### Author: ![ckamps](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@ckamps](https://meta.discourse.org/u/ckamps)
#### Post date: [10월 13, 2015, 9:03오후 UTC](https://meta.discourse.org/t/discourse-enable-cors-not-impacting-nginx-config/34434/3 "2015-10-13T21:03:07Z")

</div>

Excellent. Confirmed this is the case:

 ![](https://global.discourse-cdn.com/meta/original/3X/a/5/a5629b1559656daf0c69e12b98952670c93297d7.png)

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [10월 13, 2015, 9:05오후 UTC](https://meta.discourse.org/t/discourse-enable-cors-not-impacting-nginx-config/34434/4 "2015-10-13T21:05:23Z")

</div>


