Open ceddybi opened 1 day ago
@danlapid
Is the problem youâre having just the error message or is the functionality not working as intended in a deployed worker?
@danlapid i haven't deployed it yet, i'm trying in dev using --remote
, and the fetch request don't work, it gets stuck shows an error, looks like maybe the port is removed
Seems like we mightâve missed that then, it should work in local dev without the âremote flag and in a deployed worker
@danlapid it's actually working, i logged the request
the real issue is i'm getting 526 (invalid certificate), my app wasn't checking for this status code, that's why it was stuck
but i had set process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
to allow invalid certifications, looks like it's not working, how do you disable the invalid certificates in cloudflare fetch?
Seems like we mightâve missed that then, it should work in local dev without the âremote flag and in a deployed worker
Looks like without --remote
i don't even get the 526, it fails entirely, but when i add the flag i get status 526
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 allow fetch to work with custom ports for HTTPS, however settings this has no effect, you still get the warning and the api errors outknown 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.