Allow max image side length to be configurable
This commit is contained in:
@@ -254,7 +254,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||
return res.status(400).send('Invalid center');
|
||||
}
|
||||
if (Math.min(width, height) <= 0 ||
|
||||
Math.max(width, height) * scale > 2048) {
|
||||
Math.max(width, height) * scale > (options.maxSize || 2048)) {
|
||||
return res.status(400).send('Invalid size');
|
||||
}
|
||||
if (format == 'png' || format == 'webp') {
|
||||
|
||||
Reference in New Issue
Block a user