Fix #20 Password protected single image

This commit is contained in:
Alan Grainger
2024-11-14 12:38:05 +01:00
parent 4fb5b094f4
commit ba6ba8c811
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -99,8 +99,9 @@ class Immich {
// This is an individual item (not a gallery)
log('Serving link ' + request.key)
const asset = link.assets[0]
if (asset.type === AssetType.image && !getConfigOption('ipp.singleImageGallery')) {
// For photos, output the image directly unless configured to show a gallery
if (asset.type === AssetType.image && !getConfigOption('ipp.singleImageGallery') && !request.password) {
// For photos, output the image directly unless configured to show a gallery,
// or unless it's a password-protected link
await render.assetBuffer(request, res, link.assets[0], ImageSize.preview)
} else {
// Show a gallery page