quambo
quambo
CDCloudflare Developers
Created by quambo on 6/11/2024 in #workers-help
random 403 errors on workers outgoing fetch requests
No description
3 replies
CDCloudflare Developers
Created by quambo on 2/24/2024 in #general-help
Cloudflare Zero Trust on a VPS, Load Balancer, HTTPS
I'd like to set up 2 VPS with Hasura and cloudflared (via docker-compose), with all incoming traffic blocked, and a cloudflare load balancer listening to hasura.example.com, routing traffic to both VPS based on some rules. I'd like to have HTTPS working, without installing certs on hasura, so just let cloudflared handle it. Is this something that would work in theory? I've tried different things (like hooking up caddy in between, as reverse proxy and a lot of different configs), but I just can't get it to work. Most of the time, I end up with ERR_SSL_VERSION_OR_CIPHER_MISMATCH when trying to access hasura.example.com. Here is an example config using caddy (hope I don't even need caddy). With that config, I was at least able to connect the loadbalancer (to origin 100.90.0.5 on the virtual network). * SEE BELOW FOR EXAMPLE, POST WAS TOO LONG TO ADD IT HERE * Something I'm currently experimenting with is, without caddy, using cloudflared config to point the hostname to hasura docker container, but I'm not sure which origin I can then let point the loadbalancer to.
tunnel: ...
credentials-file: ...
warp-routing:
enabled: true

inngress:
- hostname: https://hasura.example.com/
service: http://hasura:8080
- service: http_status:404
tunnel: ...
credentials-file: ...
warp-routing:
enabled: true

inngress:
- hostname: https://hasura.example.com/
service: http://hasura:8080
- service: http_status:404
Has anyone got an idea? Thanks!
15 replies
CDCloudflare Developers
Created by quambo on 2/13/2024 in #general-help
Loadbalancer CNAME Cross-User Banned
Just set up a load balancer to one of my CF regions, but I'm getting CNAME Cross-User Banned when calling the subdomain now. I'm using a proxied load balancer, and the setup looks all good to me. The LB also shows up in CF DNS records just fine. Its a pretty new domain (got it a few days ago), but another subdomain with a worker bound to it works just fine. The subdomain I use for the LB was not used before. example ray id: 854ccb8dbff819a0
2 replies
CDCloudflare Developers
Created by quambo on 9/3/2023 in #workers-help
Durable Object namespace binding cannot communicate with other nodes
Heya, I'm getting Durable Object namespace binding cannot communicate with other nodes. with a durable object. Trying to have a simple websocket DO running. Looking into previous occurences of this error in this discord, I'm seeing mostly related to billing (people beeing on free tier), but I'm on the paid tier quambo. Think it happens on proxy from worker to durable object
if (url.pathname.endsWith('/ws')) {
const room = (url.searchParams.get('room') || 'default').toLowerCase();
console.log(`Request to ${room}`);
const obj = env.CHAT.get(env.CHAT.idFromName(room));
return obj.fetch(request.url, request);
}
if (url.pathname.endsWith('/ws')) {
const room = (url.searchParams.get('room') || 'default').toLowerCase();
console.log(`Request to ${room}`);
const obj = env.CHAT.get(env.CHAT.idFromName(room));
return obj.fetch(request.url, request);
}
logs in the durable object fetch method don't get printed, so maybe its the worker not being able to fetch the durable object.
2 replies
CDCloudflare Developers
Created by quambo on 7/1/2023 in #pages-help
Deployment to pages fails without error message
11 replies
CDCloudflare Developers
Created by quambo on 6/28/2023 in #pages-help
wrangler pages dev --no-bundle causing EPERM: operation not permitted, scandir
Getting EPERM issue on my mac, while running pages dev. Without the no-bundle option things work.
$ npx wrangler pages dev --no-bundle --compatibility-date=2023-05-18 -- npm run dev:cmd
Running npm run dev:cmd...
Sleeping 5 seconds to allow proxy process to start before attempting to automatically determine port...
To skip, specify the proxy port with --proxy.
[proxy]:
> pnpm --filter "@finalytic/trpc-*" --filter "@finalytic/app-vrplatform" dev


[proxy]: Scope: 14 of 37 workspace projects
[proxy]: apps/vrplatform dev$ PORT=4019 NODE_ENV=development VITE_PLATFORM_NAME=vrplatform vite

Automatically determined the proxy port to be 4019.
Compiling worker to "/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/functionsWorker-0.6882236361528793.mjs"...
▲ [WARNING] 2 warning(s) when compiling Worker.


wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
/Users/bkniffler/.nvm/versions/node/v18.6.0/lib/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^

[Error: EPERM: operation not permitted, scandir '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'] {
errno: -1,
code: 'EPERM',
syscall: 'scandir',
path: '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'
}
$ npx wrangler pages dev --no-bundle --compatibility-date=2023-05-18 -- npm run dev:cmd
Running npm run dev:cmd...
Sleeping 5 seconds to allow proxy process to start before attempting to automatically determine port...
To skip, specify the proxy port with --proxy.
[proxy]:
> pnpm --filter "@finalytic/trpc-*" --filter "@finalytic/app-vrplatform" dev


[proxy]: Scope: 14 of 37 workspace projects
[proxy]: apps/vrplatform dev$ PORT=4019 NODE_ENV=development VITE_PLATFORM_NAME=vrplatform vite

Automatically determined the proxy port to be 4019.
Compiling worker to "/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/functionsWorker-0.6882236361528793.mjs"...
▲ [WARNING] 2 warning(s) when compiling Worker.


wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.
/Users/bkniffler/.nvm/versions/node/v18.6.0/lib/node_modules/wrangler/wrangler-dist/cli.js:30632
throw a;
^

[Error: EPERM: operation not permitted, scandir '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'] {
errno: -1,
code: 'EPERM',
syscall: 'scandir',
path: '/var/folders/nx/kj9c3vrd6hd6fbzvdgq71vym0000gn/T/TemporaryItems'
}
3 replies
CDCloudflare Developers
Created by quambo on 6/28/2023 in #pages-help
wrangler pages dev --no-bundle
Does wrangler page dev support no-bundle option? Doesn't look like it does, just want to make sure. I have some fairly complex workers that I run esbuild on before outputting them into the functions folder. The extra buildstep afterwards seems unecessary. Any suggestions?
2 replies
CDCloudflare Developers
Created by quambo on 4/18/2023 in #pages-help
All of a sudden redirecting to index.html leading to "too many redirects"
We're hosting our pages on CF workers. Yesterdays deployments of our SPA are good, all of todays deployments suddenly give "too many redirects". Our _redirects file
/* /index.html 200
/* /index.html 200
Our deployment from 15h ago https://40f40083.console-ey3.pages.dev/ Our deployment of today https://4cedd8d6.console-ey3.pages.dev/ It keeps on redirecting to index.html and loops on there. We have made no changes to our config.
8 replies