From 088f5194c55a6ec15b2eaf2cfb97f9ef45a24a33 Mon Sep 17 00:00:00 2001 From: Angus Date: Fri, 27 Jan 2023 00:44:09 +1100 Subject: [PATCH] Re-enable streaming on Cloudflare Pages (#5914) * Support streaming on Cloudflare Pages * Create tidy-ties-repeat.md Co-authored-by: Nate Moore --- .changeset/tidy-ties-repeat.md | 5 +++++ packages/integrations/cloudflare/src/server.advanced.ts | 2 +- packages/integrations/cloudflare/src/server.directory.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/tidy-ties-repeat.md diff --git a/.changeset/tidy-ties-repeat.md b/.changeset/tidy-ties-repeat.md new file mode 100644 index 000000000..91c0678c0 --- /dev/null +++ b/.changeset/tidy-ties-repeat.md @@ -0,0 +1,5 @@ +--- +"@astrojs/cloudflare": minor +--- + +Re-enable streaming in Cloudflare Pages. diff --git a/packages/integrations/cloudflare/src/server.advanced.ts b/packages/integrations/cloudflare/src/server.advanced.ts index 0d765d0bb..b57a480f9 100644 --- a/packages/integrations/cloudflare/src/server.advanced.ts +++ b/packages/integrations/cloudflare/src/server.advanced.ts @@ -10,7 +10,7 @@ type Env = { }; export function createExports(manifest: SSRManifest) { - const app = new App(manifest, false); + const app = new App(manifest); const fetch = async (request: Request, env: Env, context: any) => { process.env = env as any; diff --git a/packages/integrations/cloudflare/src/server.directory.ts b/packages/integrations/cloudflare/src/server.directory.ts index 69d008b0f..8f1b3b8ab 100644 --- a/packages/integrations/cloudflare/src/server.directory.ts +++ b/packages/integrations/cloudflare/src/server.directory.ts @@ -5,7 +5,7 @@ import { getProcessEnvProxy } from './util.js'; process.env = getProcessEnvProxy(); export function createExports(manifest: SSRManifest) { - const app = new App(manifest, false); + const app = new App(manifest); const onRequest = async ({ request,