CORS: Whitelist pagination headers

This commit is contained in:
Robert Schilling 2017-03-02 10:14:22 +01:00
parent d415419532
commit f9788bc129
2 changed files with 6 additions and 2 deletions

View file

@ -0,0 +1,4 @@
---
title: 'CORS: Whitelist pagination headers'
merge_request: 9651
author: Robert Schilling

View file

@ -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