🎨 Palette: Improve Lightbox counter accessibility (#235)

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Ralksta
2026-05-31 10:03:08 +02:00
committed by GitHub
parent 746e9ae4c9
commit a91269eb42
3 changed files with 12 additions and 8 deletions

View File

@@ -33,12 +33,7 @@ export function getClientIp(request: NextRequest): string {
// Fallback for self-hosted environments without explicit trusted proxies:
// We have to trust headers as a best-effort, but this is vulnerable to spoofing.
return (
directIp ??
xRealIp ??
xForwardedFor?.split(',')[0].trim() ??
'unknown'
);
return directIp ?? xRealIp ?? xForwardedFor?.split(',')[0].trim() ?? 'unknown';
}
interface RateLimitEntry {