wrangler.toml -- support for 'type = "disabled"'
See original GitHub issueš” Feature request
Support for workers which, when configured and āpublishedā via wrangler, appear as āDisabledā in the UI.
Overview and problem statement
I would like to include additional configuration for workers which operate on routes that have a very broad scope, such as mysite.com/api/*
to manage specific routes which I know do not need to invoke not just the current worker, but any worker, in order to reduce unnecessary worker invocations.
Basic example
Currently, I must do this manually, or automate it via some light scripting. Although itās not that bad to manage this via the API, itād be much nicer to get this type of feature in front of users so that it can reduce worker invocations.
It would be great to set this in my wrangler.toml
file somehow, perhaps as an āenvironmentā.
wrangler.toml
type = "webpack"
account_id = "..."
zone_id = "..."
name = "all-i-want-for-christmas-is-fetch-event-bubbling"
route = "mysite.com/api/*"
[env.disabled]
type = "disabled"
routes = ["mysite.com/api/.well-known/jwks", "mysite.com/api/customers/thatoneguy/*", "mysite.com/api/externalthing/*" ]
$: wrangler publish -e disabled
Or however you want to do it. The important part is that this information about disabled routes is contained next to the rest of my workerās source code. The bits where workers arenāt running is just as important as where they do run!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:9 (4 by maintainers)
Top GitHub Comments
Perhaps this could be done with a route object, so you could enter an enabled string or an inline table with a
disable
bool. For exampleIāll discuss this internally and weāll get back to this issue.