diff options
author | Crom (Thibaut CHARLES) <crom29@hotmail.fr> | 2013-12-09 13:22:22 +0000 |
---|---|---|
committer | Crom (Thibaut CHARLES) <crom29@hotmail.fr> | 2013-12-09 13:22:22 +0000 |
commit | 906c65b6243e1f55f96d58cc1d4d60dd64c5cc65 (patch) | |
tree | 5cb5fd0246da052d619502dcb595e5138edf4706 /config/application.rb | |
parent | 87fc35073a1f5ae84798263fc7c789a32f85d637 (diff) | |
parent | dbf8ae7301b50d1652ce1ccbf974e8b8ac88ffd3 (diff) | |
download | gitlab-ce-906c65b6243e1f55f96d58cc1d4d60dd64c5cc65.tar.gz |
Merge branch 'master' of https://github.com/gitlabhq/gitlabhq
Conflicts:
config/application.rb
config/gitlab.yml.example
config/unicorn.rb.example
Diffstat (limited to 'config/application.rb')
-rw-r--r-- | config/application.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/config/application.rb b/config/application.rb index d06d47c773a..ca80e9718ce 100644 --- a/config/application.rb +++ b/config/application.rb @@ -70,7 +70,7 @@ module Gitlab config.assets.version = '1.0' # Uncomment and customize the last line to run in a non-root path - # WARNING: This feature is known to work, but unsupported + # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this. # Note that four settings need to be changed for this to work. # 1) In your application.rb file: config.relative_url_root = "/gitlab" # 2) In your gitlab.yml file: relative_url_root: /gitlab @@ -80,7 +80,14 @@ module Gitlab # # config.relative_url_root = "/gitlab" - # Uncomment to enable rack attack middleware - # config.middleware.use Rack::Attack + 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 |