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

do i need workers to connect nuxt in cloudflare pages to supabase?

do i need workers to connect nuxt to supabase? sorry just trying to learn things still a noob

No language detection on the custom domain

Hello, In the .dev sub-domain, language detection works and it automatically redirects to the correct path (fr/nl, etc.). However, if I'm on the custom domain, language detection doesn't work. I have also noticed one thing: ...

Testing workers created by @cloudflare/next-on-pages

Hi! Workers have a really nice API (unstable_dev()) which allows me to start them locally and run e2e tests on the worker. https://developers.cloudflare.com/workers/wrangler/api/ ...

Wrangler pages create project options

Is it possible from wrangler to create a project and specify the envars and the build command?

Should I buy Cloudflare Pro if I have ads on website?

I want to add my website to Cloudflare Pages from Netlify, should I buy Cloudflare Pro if I have ads on website? If I'm not mistaken I saw Vercel had some limitations that you couldn't serve ads on Free Account, is it the same here?

Is it possible to change the SSL CA for a site hosted on Pages?

I have been able to effectively change the SSL Certificate Authority through the API (/zones/{zone}/ssl/universal/settings) for sites protected by Cloudflare, but not for sites fully hosted on Cloudflare Pages. Although the changes are reflected immediately in the dashboard under Edge Certificates, the CA on the website certificate remains unchanged (yes, I have checked using cURL to ensure it isn't cached in the browser or something). Why do I care? Well, I have observed that, for instance, the certificate for www.dayfiles.com has been issued by Let's Encrypt, whereas the certificate for dayfiles.com has been issued by Google. This doesn't feel right, especially if you consider that the certificate issued by Let's Encrypt covers both dayfiles.com and *.dayfiles.com. Any ideas as to why this is the case? Is it even possible to change the SSL CA for a site hosted on Pages? Is there something I'm missing here?...

Report build status on completion?

As we're working to get our sites set up, one thing we are thinking thru is how to let the team know a build ran (or failed). We expect most builds to be done automatically via webhooks or a github merge, so automating the build reporting is as important as web stats to be sure we know updates are working. Are there any examples or docs that discuss: 1. is this better done in the app/project itself, so the build command might be npx @cloudflare/next-on-pages && npm run alert where alert would be a script we create to send some build details/status? (Downside: that adds to build time and also worry if that fails/throws that an otherwise good build might "fail" on an alert.) 2. can we 1-time-call a worker to send status to an API helping us monitor builds, uptime stats from 3rd parties, etc?...

Can't access environment variables in Wrangler dev

I've added environment variables in my CF dashboard. When running wrangler dev I expect to be able to access these in a function (e.g. export async function onRequestGet(context) {console.log(context.env)}). However, the variable I've set in my CF dashboard is always undefined. There's some confusion around whether I need to define these locally (e.g. in a .env file). I've tried this, but this also does not work. I'd prefer to NOT have to define them locally (similiar to the Netlify dev UX, where ones defined in the panel are available locally). Any insight?...

Does not work correctly on domains with www

Hi, we have a domain example.com where the cloudflare pages works correctly, and the web is displayed without any problem. However when we access by www.ejemplo.com sometimes loads and sometimes not, and often gives error nextjs application and does not open. The www are pointing with cname to cloudflare pages, and the same without the www. In cloudflare pages are configured both domains www.example.com and example.com What happens? Thanks

Disable appname.pages.dev and *.appname.pages.dev

Hello, I want to disable the pages subdomain for the website and allow only to be accessed from the custom domain assigned to it. tried the way with access but I am getting restricted on custom domain as well. Thank you.

Using Pages direct uploads with Pages Functions

Curious if this is possible. I have a build process in a monorepo, which Pages doesn't support well, so I'm using a custom upload. This works great using the cloudflare pages Github action, but I'm not sure if I'm able to add functions with this process. Would be great to not need yet another workers project for an endpoint. Does anyone know if this is possible? I've checked the docs here: https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/...

Interacting with D1 database with URL query

Hello, I want to build my pages website to show page contents based on the URL query. I made a D1 database and a function. But I am inexperienced with this stuff, and would like help. I know that functions run server-size, and therefore cannot get the window for the URL parameters, how else can I do this?...

I get the 'This ....pages.dev page can’t be found' when deploying my project

Hi, I'm trying to deploy my project from Github but I get this 'mysite.pages.dev page can't be found' message. I deployed the same project in Netlify and it does work there. I have added npm run build and dist same as in Netlify. My project is done with Vue. What am I missing? My index.html is also located in the public folder....

[Deployment issue] Deployment to Cloudflare's global network failing

Getting following error while pages deployment. {"text":"Too many bulk operations already in progress. Please wait until one completes before retrying. [code: 10046]"}],"kind":"error","name":"ParseError","code":10046} Failed: upload process exited with code: 7 ...

how do I validate a jwt using a jwks in pages?

How can I implement in cloudflare’s runtime a jwt validatation using information from the jwks endpoint ? Any tips?...

It works on my machine™

I am having an issue that I cannot get my head around. My pages url is: https://vhs.pages.dev/ When I click on tools, then back I get an Error 500. This does not occur on my dev enviroment. Using SvelteKit with the adapter-cloudflare. My account ID: 719eee1e60f61da82b11d9ad9174690b...

Refused to execute script because its MIME type ('text/html') is not executable

Hey, I deployed my next.js site with clerkdev authentication on cloudflare. I get this error in console only when user is logged in. Failed to load resource: the server responded with a status of 404 ()...

Default page instead of 404

I am wondering if I can redirect the user to a default page (eg. index.html) if the route that user provided does not exist. I don't want to show the user a 404 page.

Create project with CF API - Incomplete info

When I create a new CF Pages project using the API: https://developers.cloudflare.com/api/operations/pages-project-create-project The request is successful but when I go to the dashboard I see that the "Builds & deployments" information is missing. And I am sending it in the payload as requested by the API. ...