Allow application/json
This commit is contained in:
parent
32bb0c4937
commit
db3387d6c5
|
@ -57,7 +57,11 @@ function queryWebFinger(query, cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const contentType = res.headers['content-type'] || '';
|
const contentType = res.headers['content-type'] || '';
|
||||||
if (!contentType.startsWith('application/jrd+json')) {
|
if (
|
||||||
|
!['application/jrd+json', 'application/json'].some(ct =>
|
||||||
|
contentType.startsWith(ct)
|
||||||
|
)
|
||||||
|
) {
|
||||||
return cb(
|
return cb(
|
||||||
Errors.Invalid(
|
Errors.Invalid(
|
||||||
`Invalid Content-Type for WebFinger URL ${webFingerUrl}: ${contentType}`
|
`Invalid Content-Type for WebFinger URL ${webFingerUrl}: ${contentType}`
|
||||||
|
|
Loading…
Reference in New Issue