Serve image to embedded show urls #276
1 changed files with 8 additions and 1 deletions
|
@ -108,9 +108,13 @@ module.exports = (app) => {
|
||||||
} else {
|
} else {
|
||||||
method = SERVE;
|
method = SERVE;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (!headers['accept'] || !headers['accept'].split(',').includes('text/html')) {
|
||||||
|
method = SERVE;
|
||||||
} else {
|
} else {
|
||||||
method = SHOW;
|
method = SHOW;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* patch for backwards compatability with spee.ch/name/claim_id */
|
/* patch for backwards compatability with spee.ch/name/claim_id */
|
||||||
if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {
|
if (isValidShortIdOrClaimId(name) && !isValidShortIdOrClaimId(identifier)) {
|
||||||
let tempName = name;
|
let tempName = name;
|
||||||
|
@ -226,6 +230,9 @@ module.exports = (app) => {
|
||||||
logger.debug('file extension =', fileExtension);
|
logger.debug('file extension =', fileExtension);
|
||||||
} else {
|
} else {
|
||||||
method = SHOW;
|
method = SHOW;
|
||||||
|
if (!headers['accept'] || !headers['accept'].split(',').includes('text/html')) {
|
||||||
|
method = SERVE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logger.debug('claim name = ', name);
|
logger.debug('claim name = ', name);
|
||||||
logger.debug('method =', method);
|
logger.debug('method =', method);
|
||||||
|
|
Loading…
Reference in a new issue