Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove cf-connecting-ip headers from external override requests #724

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

dario-piotrowicz
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz commented Feb 4, 2025

this change removes cf-connecting-header headers from requests being sent to external urls during rewrites, this allows such overrides, when run inside a Cloudflare worker to rewrite to urls also hosted on Cloudflare


With this change the Rewrite to external image test passes when run in the Cloudflare repo


Original conversation: #723 (review)

Copy link

changeset-bot bot commented Feb 4, 2025

🦋 Changeset detected

Latest commit: c3863a5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

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

@dario-piotrowicz dario-piotrowicz changed the title fix: remove cf-connecting-header from external override request fix: remove cf-connecting-header headers from external override requests Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 24.31% 1951 / 8025
🔵 Statements 24.31% 1951 / 8025
🔵 Functions 51.61% 112 / 217
🔵 Branches 71.42% 485 / 679
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/overrides/proxyExternalRequest/fetch.ts 96.66% 100% 100% 96.66% 23
Generated in workflow #928 for commit c3863a5 by the Vitest Coverage Report Action

…uests

this change removes `cf-connecting-header` headers from requests being sent to
external urls during rewrites, this allows such overrides, when run inside a
Cloudflare worker to rewrite to urls also hosted on Cloudflare
Copy link

pkg-pr-new bot commented Feb 4, 2025

Open in Stackblitz

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

commit: c3863a5

@vicb
Copy link
Contributor

vicb commented Feb 4, 2025

Does the test pass with this change?
Maybe add this info to the description

@vicb vicb changed the title fix: remove cf-connecting-header headers from external override requests fix: remove cf-connecting-ip headers from external override requests Feb 4, 2025
@dario-piotrowicz dario-piotrowicz merged commit 94d6eca into main Feb 4, 2025
3 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/fetch-proxy-cf-connecting-ip-fix branch February 4, 2025 13:40
@github-actions github-actions bot mentioned this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants