DISCOURSE_ENABLE_CORS not impacting Nginx config

(Christopher Kampmeier) #1

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

(Robin Ward) #2

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.

(Christopher Kampmeier) #3

Excellent. Confirmed this is the case:

(Robin Ward) #4