RavenLame
RavenLame
CDCloudflare Developers
Created by RavenLame on 1/10/2025 in #workers-help
Workers route, how to match a specific part of the URI path ?
thanks @Walshy | Workers/Pages for your confirmation ! The problem is that this is for a customer who is testing workers, they can't send all their traffic to the workers as they will be above the free threshold. I suggest them to use a Snippet instead of a worker to test their script and being more flexible thanks to Snippet rules
6 replies
CDCloudflare Developers
Created by RavenLame on 1/8/2025 in #pages-help
Turnstile protected form on an Astro website hosted on Pages, TS backend on Functions
My bad, it was configured, but with a typo ... now it is working perfectly, URL in my browser is the same than in the logs, api endpoint is answering what I'm expecting
6 replies
CDCloudflare Developers
Created by RavenLame on 1/8/2025 in #pages-help
Turnstile protected form on an Astro website hosted on Pages, TS backend on Functions
Yes it is configured !
6 replies
CDCloudflare Developers
Created by RavenLame on 1/8/2025 in #pages-help
Turnstile protected form on an Astro website hosted on Pages, TS backend on Functions
I also noticed that I configured a custom domain for my test site, I'm browsing a URL like : "testwebsite.example.com/api/submit" but on Real-Time logs I can see the default Pages URL like "testwebsite.pages.dev//api/submit"
6 replies
CDCloudflare Developers
Created by RavenLame on 10/3/2024 in #pages-help
Hosting proxy pac on workers
export default { async fetch(request) { const pac = function FindProxyForURL(url, host) { // No proxy for private (RFC 1918) IP addresses (intranet sites) if ( isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") || isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") || isInNet(dnsResolve(host), "192.168.0.0", "255.255.0.0") ) { return "DIRECT"; } // No proxy for localhost if (isInNet(dnsResolve(host), "127.0.0.0", "255.0.0.0")) { return "DIRECT"; } // Proxy all return "HTTPS 3ele0ss56t.proxy.cloudflare-gateway.com:443"; } ; return new Response(pac, { headers: { "content-type": "text/plain;charset=UTF-8", }, }); }, };
4 replies
CDCloudflare Developers
Created by RavenLame on 10/3/2024 in #pages-help
Hosting proxy pac on workers
This is the right code below, if it can help someone else :
4 replies