summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-02 11:42:23 +0000
committerRémy Coutable <remy@rymai.me>2017-03-02 11:42:23 +0000
commite8a5d79cc0902bf2b87a811492eeaa1289a9a424 (patch)
tree1ff7f33680030248ac10114178483dfe8950417e
parent929096d1cd9d2529a7f1b080964fba64e41e5a4e (diff)
parentf9788bc12988636b03ffd3d00da10f8d58a13a37 (diff)
downloadgitlab-ce-e8a5d79cc0902bf2b87a811492eeaa1289a9a424.tar.gz
Merge branch 'expose-pagination-headers' into 'master'
CORS: Whitelist pagination headers Closes #28405 See merge request !9651
-rw-r--r--changelogs/unreleased/expose-pagination-headers.yml4
-rw-r--r--config/application.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/changelogs/unreleased/expose-pagination-headers.yml b/changelogs/unreleased/expose-pagination-headers.yml
new file mode 100644
index 00000000000..1b4cd43fa06
--- /dev/null
+++ b/changelogs/unreleased/expose-pagination-headers.yml
@@ -0,0 +1,4 @@
+---
+title: 'CORS: Whitelist pagination headers'
+merge_request: 9651
+author: Robert Schilling
diff --git a/config/application.rb b/config/application.rb
index 9088d3c432b..45f3b20d214 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -120,7 +120,7 @@ module Gitlab
credentials: true,
headers: :any,
methods: :any,
- expose: ['Link']
+ expose: ['Link', 'X-Total', 'X-Total-Pages', 'X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page']
end
# Cross-origin requests must not have the session cookie available
@@ -130,7 +130,7 @@ module Gitlab
credentials: false,
headers: :any,
methods: :any,
- expose: ['Link']
+ expose: ['Link', 'X-Total', 'X-Total-Pages', 'X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page']
end
end