| - [Not relevant] There's this limitation about fetching host+port [0] in the worker. It works fine in wrangler dev but doesn't work on Cloudflare worker. I don't mind that it's a limitation of the platform but there should be documentation and wranlger dev should be consistent with the actual worker. - It's not relevant now but I couldn't figure out how to connect cloudflared with wrangler tail on windows. Wrangler tail points to the cloudflared docs but the cloudflared docs doesn't mention wrangler at all. I was pretty lost for what to do. - [Not relevant] I haven't investigated this properly but Promise.then.catch doesn't seem to work? async/await works though. - I'm pretty sure URL.createObjectURL in this example [1] doesn't work on the worker. - Wrangler dev doesn't have the request.cf object. I see why but a dummy one would be cool. None is deal-breaker but they wear you down when you walk through the documentation. [0] https://community.cloudflare.com/t/fetch-in-worker-strips-po... [1] https://developers.cloudflare.com/workers/examples/read-post |
Thanks for the feedback!
It sounds like you may be thinking of `wrangler preview`, not `wrangler dev`. `wrangler preview` runs the worker on a service that operates outside Cloudflare infrastructure, so a lot of things aren't realistic, like support for host+port and request.cf. `wrangler dev` runs the worker inside the real Cloudflare stack on the real edge, which should solve those problems. Our plan is to sunset `wrangler preview` in favor of `wrangler dev`.
> It's not relevant now but I couldn't figure out how to connect cloudflared with wrangler tail on windows.
Good news, this has been fixed recently -- `wrangler tail` no longer requires `cloudflared`.
> - I haven't investigated this properly but Promise.then.catch doesn't seem to work? async/await works though.
Promises are implemented inside V8, so they should work exactly the same on Workers as in Chrome and Node. I'd love to see an example of what's not working if you have one.
> - I'm pretty sure URL.createObjectURL in this example [1] doesn't work on the worker.
This is indeed an API we don't support, and realistically we probably can't support. I'd be interested to understand your use case for this.