opennextjs / opennextjs-aws

Open-source Next.js adapter for AWS
https://opennext.js.org
MIT License
4.14k stars 126 forks source link

Feat: Allow overriding the proxying for external rewrite #630

Open conico974 opened 2 days ago

conico974 commented 2 days ago

This PR add an option to override the old proxyRequest fn that was used for external rewrites. It also automatically make the proxying when used in the external middleware, no need to do it in a converter or the wrapper.

By default it is the same as before, but it could use fetch for the proxying

@vicb PTAL, i haven't tested the fetch part, i'd appreciate some feedback on this

pkg-pr-new[bot] commented 2 days ago

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@630

commit: 2c73d9a

changeset-bot[bot] commented 1 day ago

⚠️ No Changeset found

Latest commit: 2c73d9a6ae09a8e8a2df12a0e94ef9ace49ef0cd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR