release: v0.19.0
Release v0.19.0. See the `## [0.19.0] — 2026-09-29` section of [CHANGELOG.md](https://github.com/ralksta/immich-folio/blob/dev/CHANGELOG.md) for the full list. Highlights: client proofing links (#683), custom content pages (#738), asset picker search (#740), concurrent-edit detection (#742), env-locked settings (#739), an accessibility baseline (#741), three security fixes with advisories (#737, #755, #759), and a pre-release quality pass (#780–#797). --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: ralksta <ralksta@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Ralf <rohlenbo79@gmail.com> Co-authored-by: Paul Thies <110185070+ImScheinox@users.noreply.github.com> Co-authored-by: lancetm714 <108419425+lancetm714@users.noreply.github.com> Co-authored-by: Lance Martin <lancetaylor95@gmail.com>
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
* Uses next/og (ImageResponse) to create 1200×630 cards.
|
||||
* Reads accent color from theme config.
|
||||
*
|
||||
* GET /api/og?title=Album+Name&subtitle=12+photos
|
||||
* GET /api/og?title=Album+Name&subtitle=12+photos&sig=…
|
||||
*
|
||||
* Only text signed by `ogImageUrl()` (lib/ogImage.ts) is rendered; anything
|
||||
* else gets the plain site card, so the site cannot be made to print
|
||||
* arbitrary text under its own name.
|
||||
*/
|
||||
|
||||
import { ImageResponse } from 'next/og';
|
||||
@@ -11,6 +15,7 @@ import { NextRequest, NextResponse } from 'next/server';
|
||||
import { getConfig } from '@/lib/config';
|
||||
import { checkRateLimit, getClientIp, retryAfterSeconds } from '@/lib/rate-limit';
|
||||
import { siteLockResponse } from '@/lib/auth';
|
||||
import { verifiedOgText } from '@/lib/ogImage';
|
||||
|
||||
/**
|
||||
* OG image rendering runs satori + resvg per request and each unique ?title
|
||||
@@ -22,7 +27,7 @@ const OG_RPM = 30;
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const ip = getClientIp(request);
|
||||
const { theme } = getConfig();
|
||||
const { theme, siteTitle, authSecret } = getConfig();
|
||||
|
||||
const { success, resetAt } = checkRateLimit(`og:${ip}`, OG_RPM);
|
||||
if (!success) {
|
||||
@@ -40,9 +45,12 @@ export async function GET(request: NextRequest) {
|
||||
const locked = siteLockResponse(request);
|
||||
if (locked) return locked;
|
||||
|
||||
const { searchParams } = request.nextUrl;
|
||||
const title = (searchParams.get('title') || 'Gallery').slice(0, 200);
|
||||
const subtitle = (searchParams.get('subtitle') || '').slice(0, 100);
|
||||
// The site title is already in the visitor's language, or falls back to the
|
||||
// locale's own word for "Gallery" (lib/config). It is also the card for any
|
||||
// URL whose text the site did not sign itself.
|
||||
const signed = verifiedOgText(request.nextUrl.searchParams, authSecret);
|
||||
const title = signed?.title || siteTitle || '';
|
||||
const subtitle = signed?.subtitle ?? '';
|
||||
|
||||
return new ImageResponse(
|
||||
<div
|
||||
@@ -83,7 +91,8 @@ export async function GET(request: NextRequest) {
|
||||
{title}
|
||||
</div>
|
||||
|
||||
{/* Subtitle */}
|
||||
{/* Subtitle — printed as the locale spells it. A lowercase transform
|
||||
turned German "25 Fotos" into "25 fotos". */}
|
||||
{subtitle && (
|
||||
<div
|
||||
style={{
|
||||
@@ -92,7 +101,6 @@ export async function GET(request: NextRequest) {
|
||||
fontWeight: 300,
|
||||
marginTop: '16px',
|
||||
letterSpacing: '0.08em',
|
||||
textTransform: 'lowercase',
|
||||
}}
|
||||
>
|
||||
{subtitle}
|
||||
|
||||
Reference in New Issue
Block a user