We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36ec430 commit 77abc21Copy full SHA for 77abc21
src/util.js
@@ -733,7 +733,13 @@ _.assignIn(util, {
733
link += `, <${fullUrl}page=${nextPage}>; rel="next"`;
734
}
735
736
+ // Allow browsers access pagination data in headers
737
+ let accessControlExposeHeaders = res.get('Access-Control-Expose-Headers') || '';
738
+ accessControlExposeHeaders += accessControlExposeHeaders ? ', ' : '';
739
+ accessControlExposeHeaders += 'X-Page, X-Per-Page, X-Total, X-Total-Pages';
740
+
741
res.set({
742
+ 'Access-Control-Expose-Headers': accessControlExposeHeaders,
743
'X-Page': data.page,
744
'X-Per-Page': data.pageSize,
745
'X-Total': data.count,
0 commit comments