niconiahi
niconiahi
Explore posts from servers
CDCloudflare Developers
Created by niconiahi on 2/22/2025 in #workers-help
the "Browser Cache TTL" does nothing
No description
4 replies
CDCloudflare Developers
Created by niconiahi on 2/22/2025 in #workers-help
setting `max-age` headers to served assets is not getting applied
I'm using React Router 7 and, in the past, I could control the TTL of any given asset with a _headers file located at the output location for my production files _headers file
/favicon.ico
Cache-Control: public, max-age=3600, s-maxage=3600
/assets/*
Cache-Control: public, max-age=31536000, immutable
/favicon.ico
Cache-Control: public, max-age=3600, s-maxage=3600
/assets/*
Cache-Control: public, max-age=31536000, immutable
this is not possible anymore. How can i archive the same functionality whichout too much assle? the AI is telling me to write a whole other Worker just to handle assets, but I don't want to deviate too much on how React Router recommends things to do please help, it shouldn't be this hard to control this. Basically manipulating the CDN aspect of Cloudflare has become increasingly harder
15 replies
CDCloudflare Developers
Created by niconiahi on 2/18/2025 in #workers-help
getting 1042 error from calling a "fetch" call within my React Router application
I'm deploying my React Router (version 7 latest) application as a Worker and it doesn't allow me to fetch an endpoint which is exactly what I need because I'm adding Cache-Control headers to make it incredibly fast
headers: {
"Cache-Control": `s-maxage=${31536000}`,
},
headers: {
"Cache-Control": `s-maxage=${31536000}`,
},
I need this to be this way because there are many JOINs involved when calling this endpoint, I want to cache and revalidate, not compute every time. what's the recommendation here? understood that it's about security, but then what? I need my native WebAPIs and techniques to work, right?
12 replies
CDCloudflare Developers
Created by niconiahi on 4/10/2024 in #pages-help
Querying for R2 object on develpment
hey! can i use r2 directly in pages? setting it through wrangler.toml. OR do i have to set it through a worker and then consume the worker from the pages app I currently have the first setup and I have effectively uploaded a R2 object but when calling it within my "wrangler pages dev" process, (in a Remix with Vite plugin app), I get null every time. Maybe I'm missing something?
1 replies
CDCloudflare Developers
Created by niconiahi on 4/4/2024 in #pages-help
ERROR with Qwik: inconsistencies between "wrangler pages dev" and production URL
No description
1 replies
CDCloudflare Developers
Created by niconiahi on 11/13/2023 in #pages-help
Recommended way of registering a Durable Object
hey people! what's the recommended way of registering a Durable Object when deploying an application (Remix) using Cloudflare Pages. Do I need to create a separate project just to deploy that? or can it be wihtin the Cloudflare Pages repo? I've seen an example using /durable_objects to register a Durable Object within a Pages repo but I'm unable to get it listed in the Cloudflare Dashboard. What am I missing?
14 replies
CDCloudflare Developers
Created by niconiahi on 11/9/2023 in #pages-help
Where do I create my Durable Object?
hey guys! quick question. Am I obligated to register a Durable Object through a Worker? because I'm using Cloudflare Pages so maybe there is a different API for this. Otherwise I'm thinking on just creating a Worker that is going to proxy to the Durable Object
6 replies