How to solve this issue, when using a
How to solve this issue, when using a custom port with HTTPS
known issue with fetch() requests to custom HTTPS ports in published Workers: the custom port will be ignored when the Worker is published using the "wrangler deploy" command.
10 Replies
@Chaika
@HardlyWorkin'
?pings
Please do not ping community members for non-moderation reasons. Doing so will not solve your issue faster and will make people less likely to want to help you.
@HardlyWorkin' i'm trying to fetch("https://some-url:12344"), but it says the 12344 port will be remove
If it's not pointed at a Cloudflare website there's a compat flag to allow you to fetch any port: https://developers.cloudflare.com/workers/configuration/compatibility-dates/#allow-specifying-a-custom-port-when-making-a-subrequest-with-the-fetch-api
Cloudflare Docs
Compatibility dates | Cloudflare Workers docs
Opt into a specific version of the Workers runtime for your Workers project.
Need flag or compat date greater then or equal to 2024-09-02
@Chaika thank you, so i set it to greater than 2024-09-02, but i still see the warning and the api still errors out
@Leo so how do like databases connect, i think they def must have custom HTTPS ports
@Leo huh? wym
i mean these databases https://developers.cloudflare.com/workers/databases/connecting-to-databases/
Cloudflare Docs
Connect to databases | Cloudflare Workers docs
Learn about the different kinds of database integrations Cloudflare supports.
one of them must be using a custom HTTPS port
true
@Chaika @Leo i just opened a new issue for this
https://github.com/cloudflare/workerd/issues/2955
GitHub
🐛 Bug Report — allow_custom_ports is not working · Issue #2955 · cl...
According to allow-specifying-a-custom-port-when-making-a-subrequest-with-the-fetch-api it says that setting the flag allow_custom_ports or a compatibility date greater than 2024-09-02, should allo...