aleclarson
aleclarson
CDCloudflare Developers
Created by aleclarson on 3/17/2025 in #general-help
wrangler host inspector on 0.0.0.0
Btw, I get this error when trying to connect through the reverse proxy: https://pastebin.com/raw/k4QND6zC Not sure if workerd's fault or the proxy's.
2 replies
CDCloudflare Developers
Created by aleclarson on 3/14/2025 in #pages-help
Question about `pages functions build` command
Strange that pages functions build has no --define flag :(
2 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
For now, I'll go with Pages. Thanks for the help!
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
Please see if my use case is being tracked internally. Thank you 😺
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
I'm thinking of using Pages and Pages Functions instead of Workers
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
Yeah I'm trying to avoid the worker invocation for static assets
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
Right, yet I'm using single-page-application setting, so HTML pages other than / end up hitting the worker first, sadly.
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
Might as well use Pages at that point, I suppose..
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
Am I forced to deploy two workers for this use case?
15 replies
CDCloudflare Developers
Created by Coshmar Godlike on 12/23/2024 in #workers-help
Static Asset - Override Headers
that would be great. is it on the roadmap?
8 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
(in wrangler dev)
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
Aww, I was really hoping this would work:
routes = [
"xyz.example.com/api/*",
{ pattern = "xyz.example.com/*", zone_name = "assets.local" }
]
routes = [
"xyz.example.com/api/*",
{ pattern = "xyz.example.com/*", zone_name = "assets.local" }
]
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
This part is a bit confusing:
In the event a request does not match a static asset, and there is no Worker script (or that Worker script calls fetch() on the assets binding), not_found_handling determines how Cloudflare will construct a response.
It says "…and there is no Worker script". But doesn't a worker script always exist when using the Static Assets feature?
15 replies
CDCloudflare Developers
Created by aleclarson on 3/13/2025 in #workers-help
Serve static assets from root path, then handle /api/ requests with my worker?
I tried these things together: - pass --route "xyz.example.com/api/*" to wrangler dev - set directory = "public" in the [assets] section of my wrangler.toml But my worker is still being invoked for non /api/ requests.
15 replies
CDCloudflare Developers
Created by aleclarson on 3/12/2025 in #general-help
Connecting to a TCP tunnel from Cloudflare Workers
I'm also curious if service tokens work with cloudflared access tcp if I want to avoid the manual login step?
4 replies
CDCloudflare Developers
Created by aleclarson on 3/12/2025 in #general-help
Connecting to a TCP tunnel from Cloudflare Workers
I've confirmed that cloudflared access tcp works with the service, but that of course isn't a thing within Cloudflare Workers.
4 replies
CDCloudflare Developers
Created by aleclarson on 3/12/2025 in #general-help
Connecting to a TCP tunnel from Cloudflare Workers
It's exposed with a public hostname btw
4 replies
CDCloudflare Developers
Created by aleclarson on 3/12/2025 in #general-help
pages.dev tunnel
this is what i get for being fancy
20 replies
CDCloudflare Developers
Created by aleclarson on 3/12/2025 in #general-help
pages.dev tunnel
i'm using a bit of an esoteric setup for a staging environment that i won't get into the details of... but yes, that's what you just helped with, and now i'm curious if i can do the opposite in development, since my web app is using Vite. but i think i can answer that myself, since my dev worker can simply redirect non-API traffic to the Vite dev server.
20 replies
CDCloudflare Developers
Created by aleclarson on 3/12/2025 in #general-help
pages.dev tunnel
to clarify, is there a recommended setup for development whereby the Workers Assets are served by Vite
20 replies