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

Every time I try to create a Cloudflare Pages, I encounter an error, but I can successfully create i

this is the response body of the request. { "result": null, "success": false,...

how to deploy CF Pages of existing static site using CLI, without using GitHub?

I’ve been developing a React project locally and the code is on a local for server not GitHub. I’m trying to create some automation so that using the CLI I can deploy to CF Pages ‘preview’ and promote to ‘production’
I’ve been using wrangler create cloudflare project since wrangler init is no longer supported and I’m having a hard time figuring out how to initialize a Pages project within an existing react project. Ideally all I want to do is programmatically be able to deploy my dist directory and overwrite the existing CF Pages deployments. ...

Is there a way to get an exact copy of what fetch sends?

I'm using Page functions and within the onRequest function I am using fetch to make a post request to another server. The remote server receives the request that is in some way different from what I'm intending to send, resulting in failure. Using wrangler and devtools I can copy the request that's failing as a curl request and when executed it succeeds....

Pages + Functions or Pages + Worker (How to dev full-stack locally)

I'm trying to create a "simple" form with form submission. Ideally what I'd like to do is create my form locally, projects/mysite.com/index.html. Then ,create all the form handling and CSRF token, turnstile logic under projects/mysite.com/src/index.ts. Then, configure the .toml file to route the worker under api.mysite.com/contact...

Astro vs CF Dashboard environment variables

Hey guys, I'm working on an Astro project and deploying it to CF Pages The problem i ran into is the following the secrets are read from .env whenever i push i have to change them so the prod variables will be deployed (i deploy it manually for now for testing) and the weird thing is the variables from the CF dashboard are not read why tf is this happens? Should i just remove the .env when deploying so the CF Dashboard vars will be loaded?...

Custom Domain Not Working (404)

I have never had this before with custom domains, but the other aliases work. Unsure what's happening here.

Trying to connect git on other cloudflare account

I have my primary cloudflare account with git connected (and it works). I tried to connect a shared cf account with my github to upload a project to pages however I get this error.
An unknown error occured. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH. (Code: 8000000)...

Pages CORS issue when communicating with Llama API

Hi, I have written a Vue 3 app which uses Vite to talk to the Llama AI worker. This works fine when running locally via the vite dev server as I am using a proxy however, after deploying to Cloudflare Pages, my requests are no longer proxied via the Vite dev server so the requests are going to the Llama AI but the OPTIONS request comes back with a 400 error. Any ideas how I can get this working correctly? Appologies if this needs posing in the Pages section of Discord - it's cross product so fel...

Got error: Your Functions script is over the 1 MiB even on Paid Plan

As per title said. We created a Pages project with functions, but fail to deploy, even if we upgrade our account to paid.

about dns record

hey , why when i try to add @ record to my domain to redirect to server ip , it say dns record not found

why high ping on pages?

ping from india on mywebsite.com is 140ms average while on mywebsite.pages.dev is 14ms what could be the reason and how to troubleshoot? ping from most other locations is good (sub 10ms)...

ReferenceError: XMLHttpRequest is not defined on api endpoint

I'm deploying a NextJS project using next on pages. I'm getting a "ReferenceError: XMLHttpRequest is not defined" when trying to run the code block below. It sounds like the worker behind the pages is trying to use XMLHttpRequest instead of the normal fetch? How do i fix this? ```ts async function getSpotifyTokens(...

DNS delay

Like 2 days ago I bought a domain and I use them with nginx, I have the dns with their nameservers in namecheap but does dns dont load. If I use 1.1.1.1 it loads, but 2 days of waiting the dns and nothing happens is lost time. The dns loads in every device in my house only happens that on my pc. Is because the domain is new or something?

Simplest way to serve same .well-known/apple-app-site-association file for multiple subdomains?

I'd like to serve the same small JSON file in response to requests for the .well-known/apple-app-site-association path across multiple subdomains. Can I accomplish this with page rules, transform rules, page functions, or workers? Some of these approaches seem overqualified, so I'm curious to hear from someone who has set this up.

Remix and Vite - 2 error(s) and 0 warning(s) when compiling Worker.

I am trying to use pages for the first time and having an issue when trying to deploy. Working locally, everything works as expected but when building and running I get the error: 2 error(s) and 0 warning(s) when compiling Worker. This is for:...

This repository is being used for a Cloudflare Pages project on a different Cloudflare account.

I am seeing this error when trying to create a Cloudflare Pages application for a repository that was previously connected to Pages but was deleted. I have been able to reproduce this: - create a pages application and link it to a repo - delete the pages application - try to create another pages application (weeks later) connected to the same repo...

deploying react app

hi people of the cloudflare. i have no clue what is happening with these error messages. if any help could be given, it would be much appreciated ``` 16:43:16.072 npm ERR! While resolving: react-scripts@5.0.1 16:43:16.072 npm ERR! Found: typescript@5.5.4...

page redirect while maintaining original URL

We have a URL: http://mappingmirroralb-1234.eu-central-1.elb.amazonaws.com/ (no SSL cert installed) We would like to have a URL with SSL: https://mapping.mydomain.com/ Users will use second URL which will redirect to first URL. However, we would like the original URL to maintain. As in, it will show mapping.mydomain.com. Just using redirect rules does not seems to work. I have read a lot of examples but non seems to be working. ...

Default maxDuration for next-on-pages?

When hosting on Vercel, there is a tier-based max duration which can be set via the maxDuration config: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#maxduration Does this maxDuration config have any affect on next-on-pages? Is there a default maxDuration if none is set?...

nameserver

hey i changed the nameserver to cloudflare 2 days ago but on cloudflare its still "pending" and everything should be right what can i do?