Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ› Bug Report β€” fetch fails locally with custom port on HTTPS #1897

Open
PierBover opened this issue Mar 26, 2024 · 4 comments
Open

Comments

@PierBover
Copy link

I'm trying to do a fetch request from a Worker to a local dev server over HTTPS and getting a 500 error.

The URL is something like this:

https://127.0.0.1:5555/some/path/etc

Wrangler only outputs this:

[wrangler:err] Error: internal error
   at (stack trace)
[wrangler:inf] GET /some/path/etc 500 Internal Server Error (19ms)

The request works as expected when disabling HTTPS in the dev server.

This is a bit of a pain because the server needs HTTPS for other features. So now we're required to manually enable/disable HTTPS when testing a single endpoint that is called from the Worker.

I'm getting this warning from Wrangler:

WARNING: known issue with fetch() requests to custom HTTPS ports in published Workers

Which refers to published workers, and I'm testing this locally.

@ivanfgm
Copy link

ivanfgm commented Oct 5, 2024

According to this custom ports are supported now: https://developers.cloudflare.com/workers/configuration/compatibility-dates/#allow-specifying-a-custom-port-when-making-a-subrequest-with-the-fetch-api

But I still get that warning on local dev πŸ€”

@LilaRest
Copy link

LilaRest commented Oct 9, 2024

Same here @ivanfgm!
Have you tried once deployed to CF network?

@ivanfgm
Copy link

ivanfgm commented Oct 31, 2024

Same here @ivanfgm! Have you tried once deployed to CF network?

Just got the chance to try on a deployed instance. Works perfectly, faultlessly, superbly, excellently, flawlessly, to perfection, without fault, ideally, impeccably, exquisitely.

@hasangenc0
Copy link

Could be related with, I wonder if anyone figured this out yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants