Skip to content

Commit acc3f2f

Browse files
authored
Fix Scalar proxy failing on Cloudflare (#2402)
1 parent d4a653d commit acc3f2f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/healthy-cars-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'gitbook': patch
3+
---
4+
5+
Fix error with the "Try it" of OpenAPI block because of the Scalar proxy failing on Cloudflare with the `cache` option

packages/gitbook/src/app/~scalar/proxy/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function POST(req: NextRequest) {
3030
// no-cors, *cors, same-origin
3131
// mode: 'cors', // Not supported on Cloudflare Workers
3232
// *default, no-cache, reload, force-cache, only-if-cached
33-
cache: 'no-cache',
33+
// cache: 'no-cache', // Not supported on Cloudflare Workers
3434
// include, *same-origin, omit
3535
// credentials: 'include', // Not supported on Cloudflare Workers
3636
headers: requestBody.headers,

0 commit comments

Comments
 (0)