diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb index c46ff289cf8..d160e181ec3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -79,5 +79,13 @@ module Gitlab # config.relative_url_root = "/gitlab" config.middleware.use Rack::Attack + + # Allow access to GitLab API from other domains + config.middleware.use Rack::Cors do + allow do + origins '*' + resource '/api/*', headers: :any, methods: [:get, :post, :options, :put] + end + end end end |