File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -114,13 +114,15 @@ module.exports = ({
114
114
alternate = linkHeaders [ 'alternate' ] ;
115
115
if ( alternate &&
116
116
alternate . type == 'application/ld+json' &&
117
+ // eslint-disable-next-line max-len
117
118
! ( res . headers [ 'content-type' ] || '' ) . match ( / ^ a p p l i c a t i o n \/ ( \w * \+ ) ? j s o n $ / ) ) {
118
119
res . headers . location = prependBase ( url , alternate . target ) ;
119
120
}
120
121
}
121
122
122
123
// handle redirect
123
- if ( ( alternate || res . statusCode >= 300 && res . statusCode < 400 ) && res . headers . location ) {
124
+ if ( ( alternate ||
125
+ res . statusCode >= 300 && res . statusCode < 400 ) && res . headers . location ) {
124
126
if ( redirects . length === maxRedirects ) {
125
127
throw new JsonLdError (
126
128
'URL could not be dereferenced; there were too many redirects.' ,
You can’t perform that action at this time.
0 commit comments