Auth: Krea-Bilddateien ohne Authentifizierung zugänglich machen

- /api/images/file/{filename} und /api/images/file/{filename}/thumb
  als GET ohne Auth erlaubt (analog zu /api/shared/)
This commit is contained in:
Meleki committed 2026-03-06 15:35:01 +01:00
1 parent 58468701b9
commit 01b3e2c230
1 file changed
+2 -1
+2 -1
View File
@@ -24,7 +24,8 @@ public class AuthMiddleware
var isTelegramWebhook = path.StartsWith("/api/telegram/webhook/") && ctx.Request.Method == "POST";
var isSharedGet = path.StartsWith("/api/shared/") && ctx.Request.Method == "GET";
var isAutologin = path == "/api/auth/autologin" && ctx.Request.Method == "GET";
if (!path.StartsWith("/api/") || path == "/api/auth/login" || isTelegramWebhook || isSharedGet || isAutologin)
var isImageFile = path.StartsWith("/api/images/file/") && ctx.Request.Method == "GET";
if (!path.StartsWith("/api/") || path == "/api/auth/login" || isTelegramWebhook || isSharedGet || isAutologin || isImageFile)
{
await _next(ctx);
return;