Skip to content

FD-773: render a password form for password-protected collections - #3

Merged
tomconroy merged 4 commits into
mainfrom
fd-773-password-gate
Jul 14, 2026
Merged

FD-773: render a password form for password-protected collections#3
tomconroy merged 4 commits into
mainfrom
fd-773-password-gate

Conversation

@tomconroy

Copy link
Copy Markdown
Member

Catch FontduePasswordProtectedError from the collection fetch and render <NodePasswordForm client:load collectionSlug={slug}> instead of a 404.

  • The runWithPreview middleware already forwards the visitor's node-access token, so no extra wiring.
  • src/middleware.ts: the CDN-cache guard now also skips responses runWithPreview marked no-store, so an unlocked render is never cached for everyone.

Requires the FD-773 fontdue-js release — pair with the version bump. Backend: fontdue/fontage#1111.

FD-773

🤖 Generated with Claude Code

Catch FontduePasswordProtectedError from the collection fetch and render
<NodePasswordForm client:load collectionSlug={slug}> instead of a 404. The
runWithPreview middleware already forwards the visitor's node-access token, so
no extra wiring; the CDN-cache guard now also skips responses runWithPreview
marked no-store, so an unlocked render is never cached for everyone.

Requires the FD-773 fontdue-js release; pair with the version bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploy Preview for fontdue-example-astro ready!

Name Link
🔨 Latest commit 04bd069
🔍 Latest deploy log https://app.netlify.com/projects/fontdue-example-astro/deploys/6a5645793b53fb00088f9d7a
😎 Deploy Preview https://deploy-preview-3--fontdue-example-astro.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

tomconroy and others added 3 commits June 25, 2026 16:05
Mount runWithFontdue (from fontdue-js/server/middleware) in place of
runWithPreview: it forwards the admin preview token AND the visitor's
per-collection node-access token into the ambient render context, and forces a
per-visitor response out of the CDN cache. runWithPreview now forwards only the
preview token, so the unlock needs runWithFontdue (its superset).

Requires the fontdue-js FD-773 release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tomconroy
tomconroy merged commit f925f66 into main Jul 14, 2026
7 checks passed
@tomconroy
tomconroy deleted the fd-773-password-gate branch July 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant