Comments (13)
We're going to close this for now as it's dependent on internal Cloudflare changes. For now, fetch ignoring custom ports is considered behaviour as designed, but that may be revisited in the future. Of noteβyou should be able to make fetch
requests to a custom port within your own Cloudflare zone.
from workers-sdk.
Let's leave this open till we ship a fix in the runtime
from workers-sdk.
Whoops, reopening
from workers-sdk.
For whomever this may help:
I recently had this issue and ended up using AWS API Gateway as a http proxy to forward requests to the custom port origin. It took only a few clicks and meant that I could continue using workers as usual. It costs pennies per month and its Edge optimised as well.
from workers-sdk.
hi all π we see this issue has been re-opened. however, we have discussed again internally and can confirm this behavior is a consequence of the interaction between the workers runtime and the rest of cloudflare's systems and isn't related to wrangler, so we are going to re-close the issue. however, there is an open internal ticket to track this: EW-1281. we note that there is not currently a timeline on this, and it's not on the immediate roadmap for the relevant team.
@codenoid in terms of a fetch to a custom port on your own cloudflare zone (see https://developers.cloudflare.com/fundamentals/setup/accounts-and-zones/#zones for reference), this won't work in wrangler dev, but will work when your worker is deployed to the cloudflare network π
from workers-sdk.
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.
from workers-sdk.
Please keep this open
from workers-sdk.
@threepointone can you reopen this? I think the release notes closed it
from workers-sdk.
I think maybe this fix broke running the wrangler dev server if you are using Yarn 3 PnP? From version 2.0.16 and onwards I now get the following error when I try to start the dev server with yarn wrangler dev
:
X [ERROR] Could not read from file: D:\Code\Cloudflare\Test\.yarn\cache\wrangler-npm-2.0.16-25a529adf2-67d437092c.zip\node_modules\wrangler\templates\checked-fetch.js
X [ERROR] Build failed with 1 error:
error: Could not read from file:
D:\Code\Cloudflare\Test\.yarn\cache\wrangler-npm-2.0.16-25a529adf2-67d437092c.zip\node_modules\wrangler\templates\checked-fetch.js
from workers-sdk.
Good catch! Fix incoming.
from workers-sdk.
@jfsiii has this been fixed?
from workers-sdk.
Recently, Custom port is respected only when fetch's URL shares the same second-level domain with the worker's custom domain.fetch()
seems to start respecting custom port in deployment. Maybe they have fixed this in the runtime. Can anybody confirm?
from workers-sdk.
"you should be able to make fetch requests to a custom port within your own Cloudflare zone"
sorry, but wdym by that?
from workers-sdk.
Related Issues (20)
- π BUG: Uploading a HOT 1
- π BUG: Failed to parse URL error when using DO with next-on-pages
- π BUG: Durable Object Alarms not triggering after a code reload HOT 1
- π C3 BUG: C3 drops potential existing arguments in the SolidStart config
- π BUG: RPC Entrypoint Misbehaves with Request Object HOT 1
- π BUG: WebSocket without Durable Object stays in CLOSING state after close
- Jesushi
- π BUG: Custom HTTPS certificate is considered expired if it's older than 30 days
- bug;Can't set compatibility date in the future: 2024-06-05 (Code: 10021) HOT 2
- Fl
- Wrangler
- Wkrs
- Nmmk
- Wr
- π BUG: pages_build_output_dir resolving to root
- π Feature Request: Load dev https certificate and key from environment variables HOT 2
- π BUG: Incorrect "workers.api.error.too_many_crons" [code: 10072] HOT 1
- π BUG: wrangler does not mark `node:async_hooks` as external when `nodejs_als` compatibility flag is used HOT 1
- π BUG: D1 Export Fails Due to Wrangler Missing the Last Character, a Zero, in the DB ID
- π BUG: Vitest cannot call fetch() on WorkerEntrypoint HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workers-sdk.