Conversation
Member
|
@greptile review this |
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.
Fixes #96.
The zero-config discovery route answers with
content-typeonly:Chromium 142+ / Edge 143+ put an extension's
fetchto127.0.0.1through the Local Network Access CORS checks, so that response is rejected before the extension can read it:Discovery therefore never resolves, and the side panel sits on "reconnecting" until the bridge URL is filled in by hand or
edge://flags/#local-network-access-checkis disabled. The reporter of #96 patchedconfigRoutelocally with these headers, restarted dsh, and had the panel come up connected with everybrowser_*tool usable — so this is a fix confirmed on real hardware, not a hypothesis.Change
The route now sends the three headers and answers
OPTIONSwith an empty 204:Why
*is safe here. The response is one field — the loopback bridge URL — and it carries no secret. Callers still have to authenticate on the WebSocket handshake:server.tskeeps the loopback-plus-chrome-extension://-origin shortcut for the token, and non-loopback remotes must present the bearer token. The mounted route only exists when this plugin is in the composition, and it already answers any caller that can reach the port.Tests
composition.spec.tsalready fetched this route and asserted the payload, so the assertions go next to the existing ones rather than into a new fixture: the GET carries all three headers, andOPTIONSreturns 204 with them. That is the pair of behaviours the browser actually exercises.I could not run macOS/Edge, and I have no Chromium 142+ here to observe the LNA gate itself — what is pinned by the test is the response contract the gate reads.