Proper configuration for CORS headers with Docker - app.yml or nginx/conf.d/discourse.conf within the container?



Continuing the discussion from How to enable Cross-origin Resource Sharing with docker:

The topic above explains setting CORS variables in containers/app.yml. This topic Cross domain rules, followed? describes setting it in the /etc/nginx/conf.d/discourse.conf file. I just had some quick questions:

  1. Does setting the variables in app.yml mean adjusting /etc/nginx/conf.d/discourse.conf inside the container is unnecessary?
  2. When setting the config in app.yml, does it go into the env: portion?

(Sam Saffron) #2

cors settings are passed using env, same way you pass any setting we have.



Is there a way to set the origin to multiple domains? * causes issues with AJAX requests.