Skip to content

Commit

Permalink
Overwrite jsonapi header on internal requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernard Labno committed Apr 25, 2016
1 parent 81cd5d9 commit ddcc717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/includes.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module.exports = function (server, adapter, schemas) {
if (!inclusionDescriptor.def.baseUri) {
return new Promise(function (resolve, reject) {
const url = '/' + type + '?filter[id]=' + remainingIds.join(',');
server.inject({method: 'get', url: url, headers: req.headers}, function (res) {
server.inject({method: 'get', url: url, headers: _.extend({jsonapi: '1.0'}, _.without(req.headers, 'jsonapi'))}, function (res) {
if (res.statusCode !== 200) {
reject(new Error(JSON.stringify(res.result)))
} else if (res.result.data.length != remainingIds.length) {
Expand Down

0 comments on commit ddcc717

Please sign in to comment.