Skip to content

Commit

Permalink
fix external rewrites to Cloudflare hosted resources not working (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored Feb 4, 2025
1 parent e218ddf commit 1ccff65
Show file tree
Hide file tree
Showing 5 changed files with 2,219 additions and 3,817 deletions.
8 changes: 8 additions & 0 deletions .changeset/four-seals-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@opennextjs/cloudflare": patch
---

bump `@opennextjs/aws` dependency to `https://pkg.pr.new/@opennextjs/aws@724`

this bump fixes rewrites to external urls not working when the external urls
point to resources hosted on the Cloudflare network
2 changes: 1 addition & 1 deletion examples/e2e/pages-router/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const nextConfig: NextConfig = {
},
{
source: "/external-on-image",
destination: "https://raw.githubusercontent.com/opennextjs/docs/refs/heads/main/public/share.png",
destination: "https://opennext.js.org/share.png",
},
],
redirects: async () => [
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"dependencies": {
"@ast-grep/napi": "^0.34.1",
"@dotenvx/dotenvx": "catalog:",
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@722",
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@724",
"enquirer": "^2.4.1",
"glob": "catalog:",
"ts-morph": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/src/cli/build/utils/version.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRequire } from "node:module";
import { join } from "node:path";
import { fileURLToPath } from "node:url";
import { fileURLToPath, URL } from "node:url";

export function getVersion() {
const require = createRequire(import.meta.url);
Expand Down
Loading

0 comments on commit 1ccff65

Please sign in to comment.