Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Trouble getting Static Form Pages Plugin working with KV on Astro Site

WebDev noob here and struggling to integrate the Static Form Pages Plugin with KV on my Astro site. I followed the instructions here and updated my astro.config.mjs to use directory mode and src/env.d.ts to include define Cloudflare runtime and KV type. Also updated KV namespace bindings on Cloudflare Pages > Settings > Fuctions. Also added a wrangler.toml with the kv_namespaces. Could someone just provide some psuedo code on how you would update this respondeWith function that serializes the formData and saves it to a KV namespace? ```JavaScript import staticFormsPlugin from "@cloudflare/pages-plugin-static-forms";...

Different repositories at different paths

Is it possible to map two different paths to two different Pages projects? e.g. my.domain.com/ is processed by project domain-root and my.domain.com/cool-dude processed by project cool-dude? Or does that have to be done via subdomains?

Deploy a python fastapi project?

Is it possible to deploy a python project with fastapi and uvicorn? If it is possible, how could it be done? Thank you so much! I search it this problem too: https://discord.com/channels/595317990191398933/1173194373362634804...

sveltekit api fetch from frontend not work

i doing follow this video: https://www.youtube.com/watch?v=qlmDj7q2x0c&t=742s But work with deploy on vps, not with cf pages. in component import to +page.svelte i fetch like this: `const checklink = async (id: number) => { try {...

Wrangler pages --json output?

We are bypassing the Git integration and using the wrangler CLI for deploying builds in CI and want to output the permalink (not the branch alias). I don't see any reference to a JSON output, any way to filter the page deployments list command, or really anything to help get this permalink in a clean way. Does it exist, if not how are others handling this? I could just scrape the output for Deployment complete! Take a peek over at, but that feels brittle....

Cache Rules Across All Regions

Hi! I'm looking to experiment with warming Cloudflare cached pages. In my particular use case, I find it important that the first hit from a user is not cold. That being said, when I configure a cache rule for a specific set of pages, how does that cached data propogate across Cloudflare datacenters? Does "warming" the cache from location A mean that it'll be cached when it hit the same page from location B? Thanks!...

banned domain??

i want to add a customer test domain to a pages app, but got an error: "The hostname is part of a banned domain. This web property cannot be added to Cloudflare at this time. If you are an Enterprise customer, please contact your Customer Success Manager. Otherwise, please email [email protected] with the name of the web property and a detailed explanation of your association with this web property.". whats wrong of that? please help BR...
No description

What happens after 500 build in the Free plan?

I have tried to find out what happens after 500 build in the free plan? Do Cloudflare start to bill you or does everything stop working? The reason for my question is that our small project previously ran on Netlify but after releasing that we where going to be billed if we went over there limits we deiced to leave them....

how to use d1 procedures with Pages

https://blog.cloudflare.com/whats-new-with-d1/ ```toml [[ d1_databases ]] What binding name to use (e.g. env.DB):...
No description

How to Fix this Error in r2.dev

hello how i want solve this error code
No description

Cloudfare R2 mismatches between 206 and 200 status code

I use cloudfare r2 to store and stream videos for my website. When i first play the video, the video works fine but when i forward to some point of the video, it restarts the video, playing from 00:00. The workaround is to reload the page, which is ofc not good for user experience. When i investigate the network log, i found out that the first time playing the video, the status code is 200. After reload the page, the status code is 206 - partial content. The issue gets worse once after i reload the page. When i try to seek to some points of the video, some of the requests are 206, but some are 200, which forces to download the large chunk of video in between. Is there a way to always make 206 requests to cloudfare r2. I am using Nextjs and videojs for streaming....

Trouble initializing wasm in SvelteKit

I am trying to use some of these @jsquash dependencies in a Pages app build with Sveltekit. I am able to get things building but when initializing the wasm during runtime, I get the following error: ```...

deployment works locally, but not via github actions

I have a deployment that perfectly works if i run locally wrangler deploy, but failed without any error message on github actions deploy. After tons of tries, figured out that there is a hint - if you want to use wrangler3 during deploy you have to specify it. that then solved it. wranglerVersion: '3' would be really helpful to either write that much bigger, or actually make the latest one the default....

Function does not work on deploy (Astro)

I have been reading both the Astro and Cloudflare docs, but I can't solve my problem. I am trying to print to console on a button press with a Cloudflare function. When using npx wrangler pages dev -- npm run dev it does work, but when deployed I get <empty string> in the console and a 404 in the Network tab, even though I can see the functions directory builds (or at least builds without error) correctly. The Cloudflare function logs do not pick up any activity. What am I doing wrong?...

Cloudflare Pages / Next.js migrated from Self-hosted based on Docker

Hi. I'm try to using Cloudflare Pages. I'm using Next.js 14 version. I successfully build and successfully deployed. But the problem is when I access to cloudflare pages details....

how to query DB from frontend using pages and D1

I've successfully been able to GET pre defined static data from my D1 database (by using the generic js code) but I'm not able to query the DB by sending a search string into the js DB function code. here are my 2 js codes javascript.js...

Is it possible to use cloudflare for SaaS with cloudflare pages site?

Is it possible to use cloudflare for SaaS with cloudflare pages site?

deploy multiple branches of the same github repository to different subdomains?

hey! i just discovered cloudflare pages and upon trying it out, it seems great! planning on moving my site over to it. i have only one issue though, that i cant use the same github repository multiple times. my layout is that each branch on the repository is a different page/subdomain (as to not clog my github profile with 50 repositories lol) would there be any way to avoid the "In use" message, or would i just have to bite the bullet and make different repositories for them all?...

Angular app building but not accessible

Hello, I have made an angular app and am having trouble publishing it to pages. My main project directory is as follows domain-finding-website-3/ ┣ backend/...