Add tag for icon

This commit is contained in:
Samy Pessé
2025-04-08 00:38:14 +02:00
parent 967b65300d
commit be6329a64a
+9
View File
@@ -3,6 +3,7 @@ import { ImageResponse } from 'next/og';
import { getEmojiForCode } from '@/lib/emojis';
import { tcls } from '@/lib/tailwind';
import { getCacheTag } from '@gitbook/cache-tags';
import type { GitBookSiteContext } from '@v2/lib/context';
import { getResizedImageURL } from '@v2/lib/images';
@@ -73,6 +74,14 @@ export async function serveIcon(context: GitBookSiteContext, req: Request) {
{
width: size.width,
height: size.height,
headers: {
'cache-tag': [
getCacheTag({
tag: 'site',
site: context.site.id,
}),
].join(','),
},
}
);
}