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

CSP issues with CF Fonts and CF Workers (execution order)

In my CF Pages site repo, I use a CF Worker (through functions/middleware.js) for, among other things, providing a Content Security Policy. One part of that CSP requires using a nonce to allow style statements, so — also with the Worker — I inject a nonce into any style statements that I must use for whatever reason. I'm now testing Cloudflare Fonts and see that my CSP is rejecting the style statements CF Fonts sets up because that nonce isn't getting injected, presumably because the CF Fonts stuff happens after the Worker runs. Am I correct in assuming that this order can't be changed? And, if that's the case, is my only option to add unsafe-inline and be done with it? (Also posted this on the Discourse. If I get an answer on either source, will indicate that and close each accordingly.)...

MIME issue

Hello everyone, I am facing issue after proxying a route checkoutv2 on cloudflare. The application is on next JS. A chunck JS file is returning HTML in response. here is the error : Refused to execute script from 'https://kapiva.in/_next/static/chunks/pages/checkoutv2-571404f0c18e2fed.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. Please help here....

Pages can't seem install nodejs

Is there a problem with pages, because it can't seem to install nodejs
No description

Help: Api calls from Nuxt.js in cloudflare pages

I have an headless CMS an want to build a frontend using Nuxt.js, deployed on CF Pages. My headless CMS will use a web-hook to CF pages when content is updated to rebuild the frontend to static data. My question is: Can Nuxt.js make api calls during the build process to my headless CMS to get the content needed to generate the website and how?...

seems zola build is not working

error: zola build command not found...

CF Pages Plugin with static assets are not working

Preview; https://e6489099.flarevault-landing.pages.dev/ Deployment ID: e6489099-e645-4596-88f5-a4ab00f32e52 Account ID: ce843bab0f4a236df5d489ce2679d931 The plugin is my own custom plugin, setup at /flarevault The build piepline directly on CF Pages breaks....

Does Next.js rewrites call count workers request?

Does Next.js rewrites call count workers request?

Two websites running under the same domain

Hello everyone, I currently use Cloudflare Pages for my website. Although my website contains everything (landing pages and the app), it has performance issues, and I want to create another project that only includes the landing pages in a separate repository but under the same domain. I don't want to create subdomains because it would negatively impact the current SEO. My question is, how can I have two websites running under the same domain? I plan to split the current codebase into a monorepo with multiple pages. Here's an example:...

Facing DNS Lookup Issue with Cloudflare WARP - Need Help!

Hello everyone! 👋 I'm currently facing an issue with Cloudflare WARP on my Mac. Whenever I try to connect, I'm presented with the following error message: ```...

Source map errors

Recently receiving source map errors using Cloudflare Tunnels to personal site. Even with restoring from a known working back up and disabling extensions, I still received errors. This website works fine on a LAN, so the variable here is the Cloudflare tunnel. Anyone have any idea why this may be? Edit: sorry for double posting this if I’m breaking any rules....
No description

pages github action not working

so i want to deploy from github pages to cloudflare pages, but apparently its not working here is the code (host.yml): ```yml deploy: environment:...
No description

Wildcard domain for pages

I set up a pages project with a function to build dashboards based on a subdomain. Now after I deployed it, I cannot setup a wildcard route like I used to for a worker. I found a post (https://community.cloudflare.com/t/wildcard-dns-entry-for-cloudflare-pages/382720) saying it will be supported at some point. Is there an ETA for that? What are current workaround? Creating another worker to proxy to the pages project with the actual worker code. Seems a lot of overhead. Another idea would be to move back to a worker project but how would I make that delivering assets and only run a function on /? In general: The subtle and not so subtle differences between a pages and a worker project are the most confusing and UX killing aspects of workers/pages right now....

Before adding to your Pages project, you'll need to transfer your DNS to Cloudflare.

I dont want to do this, since I already have a domain managed by Google. How can I simply use CNAME records?

Pages Deployments are 504ing still

We are currently having issues with the dashboard displaying once we click into one of our pages projects. It seems like the request to pull the deployments is failing on the server side and responding with a 504 - the request is using the following params for the deployments api route: /deploysments?page=1&per_page=15&sort_by=create_on&sort_order=desc. I'm suspecting it may be due to the number of deployments we currently have, but I am not 100% sure. This is a bit of a blocker and we are loo...

Connecting to a local https server from wrangler pages dev on windows.

I have a pages project with a function that makes a fetch request to another service. Locally this is running on https://localhost:9002. Notice it's using TLS, and it has a self-signed certificate, outside of my control. When I try to run wrangler pages dev I get an error rather than the expected response from the other service: ``` workerd/jsg/util.c++:275: error: e = kj/compat/tls.c++:221: failed: TLS peer's certificate is not trusted; reason = unable to get local issuer certificate
stack: 7ff699735100 7ff69977895c 0 0 0 7ff699ab4a48 7ff699ab58eb 7ff699ab7c18 0 0 0 7ff699a3938d 0 0; sentryErrorContext = jsgInternalError...

fetch failed during build process

Hello, this is the build id 5d2b77a7-9b6c-4565-b2cb-6372c8bab494 During the build process are fetched some files that are stored into a R2 storage named mostrum-cms As you can see from the build logs there is this error 12:37:00.875 [error] Can't load image https://*****_454af3e47a.jpg: fetch failed This error doesn't occur every time or on the same image resource, could you pleas check from your network logs what's the problem? Thanks...

Type safe context in Remix 2.0

I'm working a Remix 2.0 website deployed to Pages. I'm using KV but the context in the action and loader functions don't know about it. I'd rather not copy/paste ``` interface Env { CONTENT: KVNamespace; }...

My Remix.run site is erroring with a 500 on Pages (not dev), how do I track down the problem?

I don't see anywhere I can view server logs, so what is the best way to diagnose a HTTP 500 issue?