-
Notifications
You must be signed in to change notification settings - Fork 551
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
feat (pages): Proxying (200) in _redirects #2708
feat (pages): Proxying (200) in _redirects #2708
Conversation
🦋 Changeset detectedLatest commit: e04b0e1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/runs/4193296716/npm-package-wrangler-2708 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/prs/2708/npm-package-wrangler-2708 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/runs/4193296716/npm-package-wrangler-2708 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/runs/4193296716/npm-package-cloudflare-pages-shared-2708 |
70e0052
to
c11c6b9
Compare
Ah, sorry! Wrong button. Meant to approve your workflows and accidentally marked this PR as ready for review. Feel free to put it back, if you can :) |
No worries 😄 |
Docs pull made |
5eca44d
to
3361d91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing stuff. Thank you for your contribution! Only thing I'd like to look at is reusing the existing validateUrl()
function. Everything else looks perfect :)
3361d91
to
524f6d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks again for the contribution! I'll leave this up for a day just to allow others to comment if others have opinions, and then I'll merge.
It'll be available in wrangler@beta pages dev
immediately, and then @cloudflare/pages-shared
and wrangler@latest
when we next cut a release. We'll pull in these changes in production shortly afterwards and then do a release. Probably ~mid-next-week-ish by the time that it's live on Cloudflare Pages.
Codecov Report
@@ Coverage Diff @@
## main #2708 +/- ##
==========================================
+ Coverage 74.03% 74.06% +0.02%
==========================================
Files 166 166
Lines 10154 10154
Branches 2702 2702
==========================================
+ Hits 7518 7521 +3
+ Misses 2636 2633 -3
|
54a4e19
to
e04b0e1
Compare
What this PR solves / how to test:
This PR enables Pages _redirects to support proxying to files on a different url, for example pointing
/users/123
to/users/id.html
, to enable a more dynamic functionality for static sites.Associated docs issues/PR:
Author has included the following, where applicable:
Reviewer has performed the following, where applicable: