Repository navigation
Fix origin rejection when connecting Link - #151
Merged
Merged
Conversation
fmhall
marked this pull request as ready for review
October 2, 2026 16:29
This branch was successfully deployed
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.
The Link page used
no-referrer, which makes browsers sendOrigin: nullon native form POSTs. Clicking Connect Link therefore hit the endpoint's origin check and returned “Invalid request origin.”Use
same-originfor the page so its connect/disconnect forms retain the Origin header. The endpoint still rejects foreign, missing, and null origins, and its redirect to Link retainsReferrer-Policy: no-referrer.Validation:
Origin: nullbefore the change and the correct origin afterward; the cross-origin redirect sent no Referer.pnpm checkpassed: 773 tests, lint, types, formatting, and Knip. The Link integration test covers rejected origins and the OAuth redirect policy.DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54329/open_instinct KERNEL_API_KEY=build-only BETTER_AUTH_URL=http://localhost:3000 pnpm buildpassed.Live wallet authorization has not been completed. No environment variable values are included in this change.