Cloudflare Pages call functions despite I don't have any functions

For Workes & Pages, what is the name of the domain?

What is the issue or error you’re encountering

Cloudflare pages call functions despite I don’t have any functions

What are the steps to reproduce the issue?

I have deployed my next js project to cloudflare pages, it’s just one page without any backend logic, but when I open Real-time Logs in the Functions section and reload the page, I can see function logs, and each time the page loads, the function also calls.

Why does it happen? I thought pages work like CDN to deliver the HTML, CSS, JS code to the client and no functions are involved during the page opening.

Or did I misunderstand something?

Screenshot of the error

Update.

I added _routes.json with the following parameters:

{
  "version": 1,
  "description":"Built with @cloudflare/[email protected].",
  "include": ["/*" ],

  "exclude": [
        "/build/*",
          "/*.png",
          "/*.svg",
          "/*.webp",
          "/*.ico",
           "/_next/static/*"
         ]
  }

now the function doesn’t trigger for favicon but still after each page reload

next-on-pages is for Next.js SSR, it does use Functions.

If you want just a static Next build then follow: Get started | Static site | Next.js apps

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.