Opt your route into the edge runtime and it will be SSR'd
Opt your route into the edge runtime and it will be SSR'd
staging.mydomain.com)@cloudflare/next-on-pages when building the application, which builds a your Next.js app in a format that can be deployed as a full-stack app on Cloudflare Pages. There should be not be a separate worker from your Pages project if you're using Next.js API routes.

cache: 'no-store' in your fetch. by default, nextjs tries to cache fetch requests@cloudflare/next-on-pages generates a worker that would handle incoming requests to your app, and properly route requests to dynamic routes._redirects wouldn't work because the worker takes priority over the redirects in that fileimport { FunctionComponent } from "react";
import AgendaAdminPage from "./AgendaAdminPage";
import { Package } from "@/types/package";
import { Calendar } from "@/types/calendar";
const Agenda: FunctionComponent = async () => {
const dates = (await fetch(process.env.NEXT_PUBLIC_HOST + "/api/agenda", {
headers: {
"CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID,
"CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET,
} as HeadersInit,
})
.then((res) => res.json())
.catch((err) => console.log(err))) as Calendar[];
console.log(dates);
const packages = (await fetch(process.env.NEXT_PUBLIC_HOST + "/api/package", {
headers: {
"CF-Access-Client-Id": process.env.CF_ACCESS_CLIENT_ID,
"CF-Access-Client-Secret": process.env.CF_ACCESS_CLIENT_SECRET,
} as HeadersInit,
})
.then((res) => res.json())
.catch((err) => console.log(err))) as Package[];
console.log(packages);
return <AgendaAdminPage dates={dates} packages={packages} />;
};
export default Agenda;staging.mydomain.com