Wrangler: [dev] Edge Dev needs support for custom routes

Created on 25 Aug 2020  路  8Comments  路  Source: cloudflare/wrangler

馃挕 Feature request

Overview and problem statement

Since Wrangler dev is now using a proxy through custom routes we need the ability to identify custom routes. Right now it requires a root base route (example.com), we need to be able to support other routes (dev.example.com) or at the very least use wrangler_dev true in the [dev] block.

bug subject - wrangler dev user report

Most helpful comment

We are still experiencing this, I think it deserves classification as a bug - a feature that did work in v1.10.3 and does not in any further releases with no warning or documentation or alternatives supposed. Any idea when it may be addressed?

All 8 comments

I'm unable to use the latest version of Dev with subdomains (e.g. api.myworkersite.com). I'm not 100% sure, but I think this issue is the reason (calls to the subdomain are logged as calls to my root domain and return 301 redirects).

My project is using Workers for the static site (e.g. myworkerssite.com) and my site's API (e.g. api.myworkersite.com). Having Dev support subdomains is critical. Previously (before v1.11.0), I simply ran Dev for the API and Dev for the root (i.e. when developing, I ran two instances of Dev). Perhaps I'm missing something obvious here?

I, also, need to be able to test workers locally on custom subdomains.

@ashleymichal (or anyone else on the Wrangler team), is this something we might see land in the near future? It seems that v1.10.3 has stopped working for me for an unknown reason (dev compiles but always returns a 500 error), so not being able to upgrade (due to the latest lacking support for custom subdomains) has become a showstopper for me :(

Subdomains with Wrangler dev _were_ working just fine before v1.11.0. Doesn't that make this a bug fix (since it's a regression) rather than an enhancement (i.e. making it a fairly high priority item)?

@TehShrike are custom subdomains working for you on v1.10.3 (the latest version before 1.11.0)?

We moved away from Wrangler for testing our worker that relies on subdomain routing. Mostly just hoping that we don't have to touch it until after this gets fixed

We moved away from Wrangler for testing our worker that relies on subdomain routing. Mostly just hoping that we don't have to touch it until after this gets fixed

Yeah, hopefully it's fixed soon.

FWIW: I did figure out that v1.10.3 _does_ in fact still work with custom subdomains (somehow my installed version got bumped to Wrangler 1.11.0, which is why it stopped working).

Hey @yet-another-dev ! This _does_ feel like a regression. Fundamentally this has to do with the fact that the version of wrangler dev that exists in 1.10.3 is running in our preview service (the same sandboxed process that you work in on cloudflareworkers.com and when you run wrangler preview), but v1.11.0 brings the process to the edge, giving you access to APIs that aren't supported in preview like the cache api. i imagine that we missed these cases when making that change. we've got fixes to wrangler dev on our roadmap in the near future, though, so i expect to put together a milestone for that in the coming month or so.

We are still experiencing this, I think it deserves classification as a bug - a feature that did work in v1.10.3 and does not in any further releases with no warning or documentation or alternatives supposed. Any idea when it may be addressed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xtuc picture xtuc  路  4Comments

ispivey picture ispivey  路  4Comments

GregBrimble picture GregBrimble  路  6Comments

TownLake picture TownLake  路  3Comments

EverlastingBugstopper picture EverlastingBugstopper  路  6Comments