From be6329a64a6a182ae53c567f8552866960f986d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Tue, 8 Apr 2025 00:38:14 +0200 Subject: [PATCH] Add tag for icon --- packages/gitbook/src/routes/icon.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/gitbook/src/routes/icon.tsx b/packages/gitbook/src/routes/icon.tsx index 425bb4b84..03a6f3522 100644 --- a/packages/gitbook/src/routes/icon.tsx +++ b/packages/gitbook/src/routes/icon.tsx @@ -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(','), + }, } ); }