If meta.location === 'header' and the total count is less than or equal to the limit, then the pagination metadata is not included in the response headers.
Here is the code controlling this behaviour (from lib/ext.js):
if (this.config.meta.location === 'header') {
delete request.response.headers['total-count'];
if (totalCount > currentLimit && results.length > 0) {
// put metadata in headers rather than in body
If you remove the totalCount > currentLimit restriction, then the response headers have the pagination metadata and there doesn't appear to be any errors.
If
meta.location === 'header'
and the total count is less than or equal to thelimit
, then the pagination metadata is not included in the response headers.Here is the code controlling this behaviour (from lib/ext.js):
If you remove the
totalCount > currentLimit
restriction, then the response headers have the pagination metadata and there doesn't appear to be any errors.Is the current behaviour intended?