Skip to content

Commit 1ccff65

Browse files
authoredFeb 4, 2025··
fix external rewrites to Cloudflare hosted resources not working (#334)
1 parent e218ddf commit 1ccff65

File tree

5 files changed

+2219
-3817
lines changed

5 files changed

+2219
-3817
lines changed
 

‎.changeset/four-seals-return.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
bump `@opennextjs/aws` dependency to `https://pkg.pr.new/@opennextjs/aws@724`
6+
7+
this bump fixes rewrites to external urls not working when the external urls
8+
point to resources hosted on the Cloudflare network

‎examples/e2e/pages-router/next.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const nextConfig: NextConfig = {
4343
},
4444
{
4545
source: "/external-on-image",
46-
destination: "https://raw.githubusercontent.com/opennextjs/docs/refs/heads/main/public/share.png",
46+
destination: "https://opennext.js.org/share.png",
4747
},
4848
],
4949
redirects: async () => [

‎packages/cloudflare/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"dependencies": {
7474
"@ast-grep/napi": "^0.34.1",
7575
"@dotenvx/dotenvx": "catalog:",
76-
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@722",
76+
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@724",
7777
"enquirer": "^2.4.1",
7878
"glob": "catalog:",
7979
"ts-morph": "catalog:",

‎packages/cloudflare/src/cli/build/utils/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createRequire } from "node:module";
22
import { join } from "node:path";
3-
import { fileURLToPath } from "node:url";
3+
import { fileURLToPath, URL } from "node:url";
44

55
export function getVersion() {
66
const require = createRequire(import.meta.url);

‎pnpm-lock.yaml

+2,208-3,814
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.