Make it possible to add multiple CORS origins in discourse.conf and docker yml files

This commit is contained in:
Neil Lalonde 2014-06-13 14:47:09 -04:00
parent 4a2d6bd5da
commit 10f0ddbbdd
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ if GlobalSetting.enable_cors
Rails.configuration.middleware.use Rack::Cors do
allow do
origins GlobalSetting.cors_origin
origins GlobalSetting.cors_origin.split(',').map(&:strip)
resource '*', headers: :any, methods: [:get, :post, :options]
end
end