From 85b3c87b7f35843f26a9ead60f0bbfcb1d64dc2a Mon Sep 17 00:00:00 2001 From: Fred Chasen Date: Fri, 23 Jan 2015 14:57:48 -0500 Subject: [PATCH 1/3] Expose Link header in CORS Api calls --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index a7d371c78ea..ac21d23294f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -70,7 +70,7 @@ module Gitlab config.middleware.use Rack::Cors do allow do origins '*' - resource '/api/*', headers: :any, methods: [:get, :post, :options, :put, :delete] + resource '/api/*', headers: :any, methods: [:get, :post, :options, :put, :delete], expose: ["Link"] end end From 13c4e25d6fd7ce4ae34340667d6ee5640ff925a1 Mon Sep 17 00:00:00 2001 From: Fred Chasen Date: Fri, 23 Jan 2015 15:30:48 -0500 Subject: [PATCH 2/3] Split up line and use single qoutes to declare Cors settings --- config/application.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index ac21d23294f..d5a69aa8a79 100644 --- a/config/application.rb +++ b/config/application.rb @@ -70,7 +70,10 @@ module Gitlab config.middleware.use Rack::Cors do allow do origins '*' - resource '/api/*', headers: :any, methods: [:get, :post, :options, :put, :delete], expose: ["Link"] + resource '/api/*', + :headers => :any, + :methods => [:get, :post, :options, :put, :delete], + :expose => ['Link'] end end From 1f5ecf6c502b1dffa26986b1e62cf46cbc58f981 Mon Sep 17 00:00:00 2001 From: Fred Chasen Date: Fri, 23 Jan 2015 15:33:20 -0500 Subject: [PATCH 3/3] use new hash syntax --- config/application.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index d5a69aa8a79..24ba219cf3a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -70,10 +70,10 @@ module Gitlab config.middleware.use Rack::Cors do allow do origins '*' - resource '/api/*', - :headers => :any, - :methods => [:get, :post, :options, :put, :delete], - :expose => ['Link'] + resource '/api/*', + headers: :any, + methods: [:get, :post, :options, :put, :delete], + expose: ['Link'] end end