mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 10:33:22 +00:00
Expose publicly cache tags with x-gitbook-cache-tag (#230)
This commit is contained in:
+3
-1
@@ -228,7 +228,9 @@ export async function middleware(request: NextRequest) {
|
||||
}
|
||||
|
||||
if (resolved.cacheTags && resolved.cacheTags.length > 0) {
|
||||
response.headers.set('cache-tag', resolved.cacheTags.join(','));
|
||||
const headerCacheTag = resolved.cacheTags.join(',');
|
||||
response.headers.set('cache-tag', headerCacheTag);
|
||||
response.headers.set('x-gitbook-cache-tag', headerCacheTag);
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user