Repository navigation
A2App passthrough and WebSocket paths - #454
Merged
Merged
Conversation
ahmad-ajmal
added this pull request to stack #455
September 22, 2026 06:08
ahmad-ajmal
marked this pull request as ready for review
September 22, 2026 06:08
ahmad-ajmal
force-pushed
the
ahmad/a2app-passthrough
branch
from
September 22, 2026 09:50
d710e42 to
48450e1
Compare
guard_request returned None for OPTIONS before any credential check, even
when the request arrived through the tunnel or the LAN relay. _handle then
forwarded it upstream with its body and returned the app's response, so an
uncredentialed visitor holding only the bare share origin could drive and
read any native route of an adopted app with OPTIONS while every other
method was correctly refused. Every framework that answers OPTIONS with a
real handler is affected -- aiohttp add_route("*"), Express app.all,
FastAPI methods=["*"], Flask methods=['OPTIONS'], most Go muxes.
Locally OPTIONS still passes: a browser strips credentials from a preflight
by spec, so demanding one there would break every cross-origin call the
app's own UI makes. Through a share channel the app's UI is same-origin
with the app and never preflights, so nothing legitimate is lost.
Verified end to end against the real proxy with a stub upstream: remote
OPTIONS went from 200 (response delivered from the app) to 401, while a
local preflight and a local cookie-authenticated write are untouched.
The new test lives under tests/ because pytest.ini sets testpaths = tests,
so the suites in app/agent_app/test_*.py are not collected by a plain
pytest run -- the assertions guarding this surface have to sit where they
will actually execute.
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.
No description provided.