#Error 1003 on direct IP fetch

5 messages · Page 1 of 1 (latest)

tall moat
#

Hi--

I'm trying to make a direct HTTP GET (not HTTPS) to an internal IP (ASN 14586) address using fetch from within my worker.

However, when I do, I get the body error code: 1003 returned instead.

Is there anything I can do about this?
Thanks.

Framework is SvelteKit
Pseudocode:

export const GET = (async ({fetch}) => {
    let result = await fetch(`http://${IP}/data.json`)
    let data = await result.json()

    return new Response(JSON.stringify(data))
}
#

Error 1003 on direct IP fetch

junior cairn
#

You can't fetch IPs in Workers

tall moat
#

Well darn. I'm assuming there's nothing wrong with a dummy DNS record to patch it up?

tall moat
#

Alright. So I got a DNS record that A's to the IP I want to use. That seems to have worked.
Now cloudflare is returning an error 521 because I'm using a non-standard port