mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 18:28:18 +08:00
Make it possible to add multiple CORS origins in discourse.conf and docker yml files
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user