René's URL Explorer Experiment


Title: Opt-in ISR for pages that are identical for every user behind Cloudflare Access · Issue #482 · voidzero-dev/void · GitHub

Open Graph Title: Opt-in ISR for pages that are identical for every user behind Cloudflare Access · Issue #482 · voidzero-dev/void

X Title: Opt-in ISR for pages that are identical for every user behind Cloudflare Access · Issue #482 · voidzero-dev/void

Description: Summary Void skips ISR for every request that carries Cookie, Authorization, or (since #335) Cf-Access-Jwt-Assertion (Cache bypass). That is the right default. But it means an app behind Cloudflare Access, including a Void Platform proje...

Open Graph Description: Summary Void skips ISR for every request that carries Cookie, Authorization, or (since #335) Cf-Access-Jwt-Assertion (Cache bypass). That is the right default. But it means an app behind Cloudflare...

X Description: Summary Void skips ISR for every request that carries Cookie, Authorization, or (since #335) Cf-Access-Jwt-Assertion (Cache bypass). That is the right default. But it means an app behind Cloudflare...

Opengraph URL: https://github.com/voidzero-dev/void/issues/482

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Opt-in ISR for pages that are identical for every user behind Cloudflare Access","articleBody":"### Summary\n\nVoid skips ISR for every request that carries `Cookie`, `Authorization`, or (since #335) `Cf-Access-Jwt-Assertion` ([Cache bypass](https://github.com/voidzero-dev/void/blob/main/docs/guide/edge/revalidation.md#cache-bypass)). That is the right default. But it means an app behind Cloudflare Access, including a Void Platform project with Zero Trust protection, can never be served from the ISR cache, even for pages that are the same for everyone Access lets in. The Zero Trust docs already note the cost: \"Protected pages render on each request, which can increase latency and request usage.\" ([Caching](https://github.com/voidzero-dev/void/blob/main/docs/guide/platform/administration/zero-trust.md#caching))\n\nAccess decides who may see the app. I'd like a per-path opt-in where the developer states that the response is the same for everyone Access admits, so Void can serve it from the ISR cache once Access has admitted the request. The default would not change.\n\n### Use case\n\nA private, annotated collection of statutes behind Access: tens of thousands of pages, a handful of readers, most pages rarely opened. The statute pages are the same for every reader, so we want each page rendered on first request and served from the ISR cache afterwards. Per-user parts (bookmarks, notes, \"last read\") come from islands that call uncached `/api` routes, so the cached HTML stays shared. Streaming such parts with `defer()` would not work, since they would be stored as part of the cached response. `output: \"static\"` would render every page on every build, while most pages are never read. Behind Access today, every view renders instead.\n\n### What reaches the Worker behind Access\n\nChecked on our production site (`workers.dev`, protected by Access) with a route that returns only cookie names and header presence: a signed-in browser's request reaches the Worker with the cookies `CF_AppSession` and `CF_Authorization`, the headers `Cf-Access-Jwt-Assertion` and `Cf-Access-Authenticated-User-Email`, and no `Authorization` header. Each of these alone is enough to bypass ISR today.\n\n\u003cdetails>\n\u003csummary>Local reproduction of the current bypass (\u003ccode>void@1.1.11\u003c/code>, \u003ccode>vite preview\u003c/code>)\u003c/summary>\n\n`ISR_CACHE` was a local KV namespace bound through `cloudflare.kv_namespaces`, so this is not Cloudflare's edge and not a real Access deployment; Access was simulated by adding its header and cookies by hand. The page is `pages/laws/[id].tsx` with `export const revalidate = 31536000`, and its loader returns a render timestamp. Each row shows two requests for the same path:\n\n| Request credentials | 1st | 2nd | Same HTML |\n| --- | --- | --- | --- |\n| none | `x-isr-cache: MISS` | `HIT` | yes |\n| `Cf-Access-Jwt-Assertion` | no ISR header | no ISR header | no |\n| `Cookie: CF_Authorization=…` | no ISR header | no ISR header | no |\n| `Cookie: CF_AppSession=…` | no ISR header | no ISR header | no |\n| both Access cookies + `Cf-Access-Jwt-Assertion` | no ISR header | no ISR header | no |\n| `Cookie: theme=dark` | no ISR header | no ISR header | no |\n| `Authorization: Bearer …` | no ISR header | no ISR header | no |\n\nA path warmed without credentials was rendered again when requested with both Access cookies and `Cf-Access-Jwt-Assertion`. Entries are keyed by hostname (`127.0.0.1` and `localhost` each started with `MISS`). Responses served from the ISR cache carried `Cache-Control: public, max-age=0, must-revalidate`.\n\n\u003c/details>\n\n### Proposal\n\nThe name is a placeholder. The opt-in could sit next to the per-page `revalidate` export (and, mirroring `revalidate`, as a `routing` pattern in `void.config.ts`):\n\n```ts\n// pages/laws/[id].server.ts\nexport const revalidate = 31536000;\nexport const sharedBehindAccess = true; // placeholder name\n```\n\n**What the opt-in means.** The whole cached response (layout, embedded loader data and headers included) is the same for every user Access admits, and no authorization beyond Access is needed. The second half matters because a cache hit is served before the app runs: in 1.1.11 the ISR lookup in the Worker's fetch handler comes before `app.fetch`, so middleware does not run on a hit (`void/dist/runtime/routing.mjs`). A page that reads the identity, or relies on app middleware to turn some admitted users away, must not opt in.\n\nFor a path that opts in:\n\n- **Ignored credentials.** Void parses the `Cookie` header. If every cookie name is `CF_Authorization` or `CF_AppSession` (exact names; both are documented on the application hostname in [Authorization cookie](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/authorization-cookie/), and both reach the Worker as shown above) and the only other credential is `Cf-Access-Jwt-Assertion`, the request uses the ISR cache like a public request. Any other cookie, and any `Authorization` header, still bypasses the cache. No prefix matching such as `CF_*`; `CF_Binding` is stripped before the origin, and `CF_Session` and `CF_Device` belong to the team domain.\n- **Storage rules unchanged.** Whether to store is decided on the app's response as today (complete `200` only; no `Set-Cookie`, `private`, `no-store`, `no-cache` or `Vary` on request headers; `x-revalidate: 0` still opts out).\n- **Browser-facing copy is private.** For requests that carried Access credentials, the copy sent to the browser gets `Cache-Control: private, no-cache` instead of `public, max-age=0, must-revalidate`, on `MISS`, `HIT`, `STALE` and after background revalidation alike. The runtime already builds the stored copy and the client copy separately (`clientRevalidateResponse()` in `@void/isr`).\n- **Same boundary for the Pages JSON.** The `X-VoidPages` JSON variant follows the same rules as the HTML.\n- Paths that don't opt in behave exactly as today.\n\n### Safety\n\n- **Cache hits stay behind the existing checks.** On Void Platform, #335 says that dispatch checks the Access JWT again before it serves Worker, static or ISR content; every hit for an opted-in path must keep that order. With direct Cloudflare deploys, Access runs in front of the Worker; this proposal relies on that, does not treat the presence of an Access cookie or header as proof, and does not ask for JWT validation in the Worker.\n- **No reuse across hostnames.** Entries are keyed by hostname, so an entry filled through a protected hostname is never served on another one.\n- **Identity-read detection is only an aid.** Every admitted request carries `Cf-Access-Authenticated-User-Email`, so a render can always read the identity. Void could warn in dev, or refuse to store, when a render on an opted-in path reads it, but a hit renders nothing; the developer's statement is what safety rests on. The docs should say so plainly, as #408 does for hand-written `ETag`s.\n\n### Acceptance criteria\n\n- A cache entry filled by admitted user A is served to admitted user B.\n- No content is served from the cache to a request that is unauthenticated, carries invalid credentials, or was rejected by Access, even when an entry exists.\n- A request with any non-Access cookie or an `Authorization` header neither reads nor writes the cache.\n- `MISS`, `HIT`, `STALE` and background revalidation apply the same storage rules and the same browser-facing policy.\n- The `X-VoidPages` JSON variant follows the same boundary as the HTML.\n\n### Current workaround and alternatives\n\nWe turned ISR off and cache the HTML in our own Cache API middleware. It works, but it loses stale-while-revalidate, per-path TTLs and `revalidate({ paths })`, and it ignores every credential, not only Access's (in the reproduction it served cached pages to requests with other cookies or `Authorization`). An Access Bypass policy for those paths would make them public. `output: \"static\"` is covered in the use case above.\n\n### Open questions\n\n- Naming, and whether the opt-in belongs in a per-page export, in `routing`, or both; a single switch may suit an app that sits entirely behind Access.\n- Cloudflare's edge cookies (`__cf_bm`, `cf_clearance`) on custom domains where Bot Fight Mode or a WAF challenge runs alongside Access.\n\n### Environment\n\n- `void@1.1.11`, `@void/md`, React 19.3.1, Vite 8.3.4, Node.js 24.22.0, pnpm 12.14.0\n- Production: `void deploy --platform cloudflare` to `workers.dev`, protected by Access (\"Manage Worker access\"). ISR is off there.\n- Reproduction: local `vite preview` (workerd) with a local KV namespace as `ISR_CACHE`.","author":{"url":"https://github.com/toshi-kuji","@type":"Person","name":"toshi-kuji"},"datePublished":"2026-10-18T17:40:51Z","url":"https://github.com/voidzero-dev/void/issues/482"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:70c67e50-92e9-21b1-40c1-2d29e1f8f426
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD44:394173:1C05912:2608477:6AFB9157
html-safe-nonceb04b2f5cb0f0d4b90671e9bb7dac7974aecdf6aa95a6ed5360ddab45bc1a0426
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDQ0OjM5NDE3MzoxQzA1OTEyOjI2MDg0Nzc6NkFGQjkxNTciLCJ2aXNpdG9yX2lkIjoiNTA1NTUzNjc3OTYzMzU5NDcxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0d4a113b0b76a612bfdf1998891e190d5569d383fc19d7fc9bfca036ac0678d1
hovercard-subject-tagissue:5912290800
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/482/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d3111aee8719d0d9a91da3b368cdcc899242eba45ddb7c6e5dc62535670adab2/voidzero-dev/void/issues/482
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d3111aee8719d0d9a91da3b368cdcc899242eba45ddb7c6e5dc62535670adab2/voidzero-dev/void/issues/482
og:image:altSummary Void skips ISR for every request that carries Cookie, Authorization, or (since #335) Cf-Access-Jwt-Assertion (Cache bypass). That is the right default. But it means an app behind Cloudflare...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametoshi-kuji
hostnamegithub.com
expected-hostnamegithub.com
None4f01efe06174a5ba6342fd58e42d02295e0675bedbb465d6bef2dbaec8e46556
turbo-cache-controlno-preview
go-importgithub.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git
octolytics-dimension-user_id149750581
octolytics-dimension-user_loginvoidzero-dev
octolytics-dimension-repository_id1164437080
octolytics-dimension-repository_nwovoidzero-dev/void
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1164437080
octolytics-dimension-repository_network_root_nwovoidzero-dev/void
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea52db8866b6543b4e83730cd6a6b1360f1a9e4dc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/482#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F482
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F482
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=voidzero-dev%2Fvoid
Reloadhttps://github.com/voidzero-dev/void/issues/482
Reloadhttps://github.com/voidzero-dev/void/issues/482
Reloadhttps://github.com/voidzero-dev/void/issues/482
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues31 (31)https://github.com/voidzero-dev/void/issues
Pull requests16 (16)https://github.com/voidzero-dev/void/pulls
Discussionshttps://github.com/voidzero-dev/void/discussions
Actionshttps://github.com/voidzero-dev/void/actions
Security and qualityhttps://github.com/voidzero-dev/void/security
Insightshttps://github.com/voidzero-dev/void/pulse
https://github.com/voidzero-dev/void
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/482
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/482
Opt-in ISR for pages that are identical for every user behind Cloudflare Accesshttps://github.com/voidzero-dev/void/issues/482#top
https://github.com/toshi-kuji
toshi-kujihttps://github.com/toshi-kuji
on Oct 18, 2026https://github.com/voidzero-dev/void/issues/482#issue-5912290800
#335https://github.com/voidzero-dev/void/pull/335
Cache bypasshttps://github.com/voidzero-dev/void/blob/main/docs/guide/edge/revalidation.md#cache-bypass
Cachinghttps://github.com/voidzero-dev/void/blob/main/docs/guide/platform/administration/zero-trust.md#caching
Authorization cookiehttps://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/authorization-cookie/
feat(platform): add project Zero Trust protection #335https://github.com/voidzero-dev/void/pull/335
fix(auth): keep private route cache policies on authenticated responses #408https://github.com/voidzero-dev/void/pull/408
https://github.com/huv1k
huv1khttps://github.com/huv1k
on Oct 20, 2026https://github.com/voidzero-dev/void/issues/482#issuecomment-6284663892
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/482
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/482
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.