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

Nextjs app html pages error 500

Hey everyone, I'm encountering a peculiar issue with my Next.js app. The app itself is running smoothly, but I'm facing a problem with HTTP requests specifically for HTML pages. Whenever I try to access any HTML document within the app, it consistently returns an 500 HTTP server error, despite everything else functioning correctly. Thanks in advance for your help!...

How do I redirect a path to a different domain?

I am trying to send all traffic from mydomain.com/blog to mydomain.ghost.io using redirect rules but these seem to do nothing.I already have an A record with "mydomain.com" and it's being proxied. I tried a page rule but it didn't do anything: Pattern to Match Incoming Requests: mydomain.com/blog/* Forwarding URL: https: //mydomain.ghost.io/$1...

GitHub Repository Connect Not Working

I am new to CloudFlare. I setup a new account and followed the CF documentation for pages setup. I successfully connected my GitHub repository (CloudFlare Pages is displayed as an installed GitHub App), but CF does not allow me do the 'build and deploy' step. The "Begin Setup" button is disabled on the pages dashboard. I have spent a lot of time reading documents and reviewing my GitHub repository but have not been able to figure out what is going on. Any ideas you might have would be great...

Cloudflare pages not reporting back to Github

Hi, We recently started having the issue that the completed pages builds are not reported back to github. What might be the reason for this? It just hangs at waiting for status to be reported....
No description

Production branch setup

I have setup two worker pages, one of which has worked and automatically detects 'master' builds as the production environment. The other, I can no longer find the setting to update. Looking at the docs below, it mentions Pages project > Settings > Builds & deployments > Configure Production deployments however i cannot see Builds & deployments. I assumed it has changed location, but cant find it. Am i being blind? where can i find the place to set this branch rule please šŸ™ Heres a screenshot of what i can see https://developers.cloudflare.com/pages/configuration/branch-build-controls/#:~:text=%E2%80%8B%E2%80%8B%20Production%20branch%20control,another%20branch%20if%20you%20choose...
No description

Content-Length Missing Only with Automated Deployment

When uploading using the pages-action deployment the ā€œcontent-lengthā€ is missing from the response on my assets. When I deploy manually from the console by uploading a directory, it’s fine / present. My workflow:...

CF Page 20k limitation

Good day, I want to host a static news website on CF Pages that has 20k+ articles. Is there any way to increase the 20k file limit? Thanks in advance!...

Cache Rules for Bots

Hi! I'm trying to set up a Cache Rule for just bots. My account has bot management enabled, and I can see the documentation for the field here https://developers.cloudflare.com/ruleset-engine/rules-language/fields/ However, none of those fields show up in the UI. Is this just a UI issue? e.g. If I directly edit the expression, will it still access + evaluate those fields for my rule?...

JS/CSS won't uncache without a purge

Even after the weekend, my JS/CSS files for my Pages deployment are still being cached. I have to run a Purge Cache on those files on every deploy to get them uncached. I thought a deployment would automatically clear those files from the cache. Any strategies to fix this issue? Is it common and I just don't know what to search for? Thank you!...

Nuxt 3 | Failing to fetch '/api/mail'

Hello, been working on a simple SMTP Mail system, however when trying to post data from the client to the server, '/api/mail', I get a 500 error.
POST https://smtp-mailer.pages.dev/api/mail 500 (Internal Server Error) entry.B-5-OyzN.js:23 Uncaught (in promise) FetchError: [POST] "/api/mail": 500
...

Cloudflare Pages, 503 errors in the dashboard

Anyone else having issues accessing the "workers-and-pages" dashboard? Currently getting "API Request Failed" 503 errors and builds are not completing...

Custom Subdomain for git branches

cf pages automatically creates ${branchName}.my-app.pages.dev and that is great but I don't want to expose any *.pages.dev. my app is deployed at app.mydomain.com and I'd like the alpha or beta branch to be accessible at alpha.app.mydomain.com & beta.app.mydomain.com respectively. I can add alpha.app.mydomain.com along side app.mydomain.com under the custom domains section but it resolves as an alias of app.mydomain.com and I fail to see how I can choose what deployment is associated to a specific domain....

Astro Hybrid output with Server Endpoints (API Routes)

Has anyone managed to get Astro with output: "hybrid" mode working in CloudFlare pages with Server Endpoints https://docs.astro.build/en/guides/endpoints/#server-endpoints-api-routes Astro docs on CloudFlare adapter https://docs.astro.build/en/guides/integrations-guide/cloudflare/ claim that:
This adapter allows Astro to deploy your hybrid or server rendered site to Cloudflare....

The deployment failed due to an internal error. Retry deployment to restart the build process.

Deploying a Sveltekit project from Github & all went well until the end where it threw this error at me... which I don't even have a routes.json file within my project so no idea how to sort it out. Added the logs to show it all went well until the end. I've cleared cache, triple checked the build and preview and nothing is working. Anyone know what I should do next? Error: Failed to publish your Function. Got error: Error 8000057: Rule (%s) in routes.json is over the 100 character limit. Refer to https://cfl.re/3FsE4aF....

mp4 issue, files end up broken

I added two mp4 files to my Astro site. It all works locally but when I upload via Wrangler, I'm getting the crossed-out play button like it's a plug-in error. The files are part of the design and well under one megabyte. GIFs would end up being too large in file-size. Does someone have experience with this issue and can tell me what happened and how to fix it? I've rolled it back to the previous version for now....

how to delete pages

I used to just have a delete option from the settings. now i can see an option from the manage deployments drop-down but its greyed out saying
deployment cannot be deleted because it is currently your active Production deployment.
deployment cannot be deleted because it is currently your active Production deployment.
...

Serving SPA in subdirectory

I know you can serve a SPA (single-page application) in the root of the Pages deployment, if you don't have a 404.html in the root (https://developers.cloudflare.com/pages/configuration/serving-pages/#single-page-application-spa-rendering). However, I want to have normal page serving behaviour for the root and most of the site, but have SPA style page serving in a specific subdirectory (e.g. example.com/spa/) - so that any request URL that begins with /spa/* responds with /spa/index.html without redirecting. How could I achieve this?...

what to do next after enabling HSTS?

Heya! I’ve enabled HSTS (1 year, with all toggles enabled). Than I’ve tried to add my website to a preload list on hstsprelod org, but I do get ā€œerror: No HSTS headerā€. Where do I add this header? I have a static website built with Astro. ✨🫶...