hsnilsson
hsnilsson
CDCloudflare Developers
Created by hsnilsson on 10/15/2024 in #next-on-pages
**Error:**
Just found an issue put on this: https://github.com/cloudflare/next-on-pages/issues/883 (same conclusion as I got to)
3 replies
CDCloudflare Developers
Created by hsnilsson on 10/15/2024 in #next-on-pages
**Error:**
So maybe when running next-on-pages, due to how env variables are handled, those preview props doesn't come through somehow 🤔 I'm not sure how to move forward, but would definitely help out solving this 🙏
3 replies
CDCloudflare Developers
Created by hsnilsson on 10/15/2024 in #next-on-pages
**Error:**
Might be related to a recent change in how Next injects the "preview props" for draft mode in edge runtime. It now uses env vars instead of prerender manifest (https://github.com/vercel/next.js/commit/1d9a78c1cbb6f65e57a41d1282591a8d9e1c4caf#diff-1f7cb348a2c0cd0f796f813e816b86a9443b4a6ecfa331d34edc8e3ccdc79319L43)
3 replies
CDCloudflare Developers
Created by hsnilsson on 4/17/2024 in #pages-discussions
Hi, is authentication available for
Aha, think i'm getting this now. functions/_middleware.ts is where it's supposed to run. So skimming thorugh https://developers.cloudflare.com/pages/functions/middleware/ it seems I could just put it under functions/admin/_middleware.ts to have it on that route only.
1 replies