Merge pull request #276 from lbryio/serve-image-to-embedded-show-urls

Serve image to embedded show urls
This commit is contained in:
Bill Bittner 2017-11-28 13:37:11 -08:00 committed by GitHub
commit 6ae9b78dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,6 +110,9 @@ module.exports = (app) => {
}
} else {
method = SHOW;
if (!headers['accept'] || !headers['accept'].split(',').includes('text/html')) {
method = SERVE;
}
}
/* patch for backwards compatability with spee.ch/name/claim_id */
if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {
@ -226,6 +229,9 @@ module.exports = (app) => {
logger.debug('file extension =', fileExtension);
} else {
method = SHOW;
if (!headers['accept'] || !headers['accept'].split(',').includes('text/html')) {
method = SERVE;
}
}
logger.debug('claim name = ', name);
logger.debug('method =', method);