CORS: Whitelist pagination headers
This commit is contained in:
parent
d415419532
commit
f9788bc129
2 changed files with 6 additions and 2 deletions
4
changelogs/unreleased/expose-pagination-headers.yml
Normal file
4
changelogs/unreleased/expose-pagination-headers.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: 'CORS: Whitelist pagination headers'
|
||||
merge_request: 9651
|
||||
author: Robert Schilling
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue