Skip to content

Commit

Permalink
Add contentType check to XHR documentLoader link header test.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Dec 31, 2019
1 parent 99d2592 commit 87e34e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/documentLoaders/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ module.exports = ({

// handle Link Header (avoid unsafe header warning by existence testing)
let linkHeader;
if(REGEX_LINK_HEADER.test(req.getAllResponseHeaders())) {
if(REGEX_LINK_HEADER.test(req.getAllResponseHeaders()) &&
contentType !== 'application/ld+json') {
linkHeader = req.getResponseHeader('Link');
}
if(linkHeader && contentType !== 'application/ld+json') {
Expand Down

0 comments on commit 87e34e7

Please sign in to comment.