-
Notifications
You must be signed in to change notification settings - Fork 807
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: route deployment fallback for restricted permission API tokens (#…
…1188) * refactor: add assertion to avoid incorrect API resource paths * refactor: move zone finding into its own helpers This makes it available to use elsewhere in the code. * fix: fallback on old zone-based API when account-based route API fails While we wait for changes to the CF API to support API tokens that do not have "All Zone" permissions, this change provides a workaround for most scenarios. If the bulk-route request fails with an authorization error, then we fallback to the Wrangler 1 approach, which sends individual route updates via a zone-based endpoint. Fixes #651
- Loading branch information
1 parent
2d42882
commit b44cc26
Showing
12 changed files
with
473 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: fallback on old zone-based API when account-based route API fails | ||
|
||
While we wait for changes to the CF API to support API tokens that do not have | ||
"All Zone" permissions, this change provides a workaround for most scenarios. | ||
|
||
If the bulk-route request fails with an authorization error, then we fallback | ||
to the Wrangler 1 approach, which sends individual route updates via a zone-based | ||
endpoint. | ||
|
||
Fixes #651 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.