Repository navigation
Send same-origin cookies, so the reader works behind a login - #7
Merged
Merged
Conversation
Both fetches (the llms.txt probe and the reader) used credentials: "omit". On a deployment behind a login, such as a Vercel preview with Deployment Protection, the cookieless request was redirected to the login page: the probe failed, or the reader's fetch failed and Machine fell back to navigating to the raw file, with no reader and no pill. same-origin sends the visitor's cookies only to the site's own origin, so a cross-origin data-llms URL still gets none. Adds a test that no fetch drops same-origin cookies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zordhalo
added a commit
that referenced
this pull request
Oct 29, 2026
Follow-up to #7. The reader now fetches with same-origin cookies, so the URL it fetches must not be choosable by markup page content can inject: a <link rel="llms"> in the body is ignored. Every documented install already puts it in <head>; the README now says so. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Both fetches used
credentials: "omit". On a site behind a login (a Vercel preview with Deployment Protection, an intranet), the cookieless request is redirected to the login page:llms.txtprobe fails and the pill never appears.Seen on advancelabs.dev's preview deployment.
Fix
Both fetches use
credentials: "same-origin". The visitor's cookies go only to the site's own origin, so a cross-origindata-llmsURL still gets none. No behaviour change on public sites.Checks
npm test: 35 pass, including a new test that no fetch drops same-origin cookies.Follow-up
The WordPress plugin pins
HMV_COMPONENT_VERSION1.4.0 with SRI, so it needs its own bump to pick this up.🤖 Generated with Claude Code