-
Notifications
You must be signed in to change notification settings - Fork 734
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: optionally send zone_name
with routes
#797
Conversation
🦋 Changeset detectedLatest commit: ae62a5f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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.developers.workers.dev/runs/2173496602/npm-package-wrangler-797 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/797/npm-package-wrangler-797 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2173496602/npm-package-wrangler-797 dev path/to/script.js |
aae03f0
to
8f5105e
Compare
Can you explain a bit more about what this is fixing? If deployment zone is actually independent of routes (i.e. when we cannot infer it) then I would feel more happy to have a separate configuration of what zones we want to deploy to... But I feel I am missing some context here. |
Ok, so the context here is that you can deploy to routes that are associated with completely different |
need it now, gonna give it a spin 👀 |
its working like a charm!
|
Oh yay! |
8f5105e
to
709e07f
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.
looks good to me, maybe we should encapsulate the routes config type in its own type Routes =
block but that's mostly just preference. approved :)
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.
OK happy to approve this - as it is just an addition to the previous zone_id work.
But I am a bit confused.
Is this using undocumented API? The docs here https://api.cloudflare.com/#worker-routes-update-route only accept a body containing a JSON object of the form { pattern, script }
- no zone_id
nor zone_name
.
A followup to #778, this lets you send an optional `zone_name` with routes. This is particularly useful when using ssl for saas (https://developers.cloudflare.com/ssl/ssl-for-saas/). Fixes #793
709e07f
to
ae62a5f
Compare
Correct, the docs need to be updated. |
(also that's not the api we use, we instead use some newer apis which aren't documented yet) |
A followup to #778, this lets you send an optional
zone_name
with routes. This is particularly useful when using ssl for saas (https://developers.cloudflare.com/ssl/ssl-for-saas/).Fixes #793