mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
Pass next.internal on fetch requests to avoid I/O sharing (#197)
This commit is contained in:
Vendored
+5
-1
@@ -9,7 +9,11 @@ export const noCacheFetchOptions: Partial<RequestInit> = {
|
||||
// Cloudflare doesn't support the `cache` directive before next-on-pages patches the fetch function
|
||||
// https://github.com/cloudflare/workerd/issues/698
|
||||
// cache: 'no-store',
|
||||
next: { revalidate: 0 },
|
||||
next: {
|
||||
revalidate: 0,
|
||||
// @ts-ignore - experiment to bypass potential I/O sharing in Next
|
||||
internal: true,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'server-only';
|
||||
|
||||
import { noCacheFetchOptions } from '@/lib/cache/http';
|
||||
|
||||
import { rootUrl } from './links';
|
||||
|
||||
export interface CloudflareImageJsonFormat {
|
||||
@@ -147,6 +149,7 @@ export async function resizeImage(
|
||||
: `image/${resizeOptions.format || 'jpeg'}`,
|
||||
},
|
||||
signal,
|
||||
...noCacheFetchOptions,
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user