patch to serve images on embedded show urls

This commit is contained in:
bill bittner 2017-11-28 13:26:48 -08:00
parent ab3d6243e8
commit 0668ef606b

View file

@ -109,7 +109,11 @@ module.exports = (app) => {
method = SERVE;
}
} else {
method = SHOW;
if (!headers['accept'] || !headers['accept'].split(',').includes('text/html')) {
method = SERVE;
} else {
method = SHOW;
}
}
/* patch for backwards compatability with spee.ch/name/claim_id */
if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {
@ -226,6 +230,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);