discourse/discourse — pull request #1925 by slainer68 (2014-02-10 07:19:26+00:00)
Title: Use GlobalSetting to enable CORS at application level

Hi,

first I would like to say that I understand that it's possible to control CORS using a front webserver like nginx/apache.

But I think that rack-cors should stay available in Discourse as it is a convenient way to enable CORS without changing its webserver config, when using only a simple webserver like thin in dev mode, and/or for simple use-cases.

As GlobalSetting is now the preferred way to set the global configuration, I've just switched the initializer to use it. Thanks.