Fix remote-stack log streaming: URL-encode agent token in WS proxy (0.13.2)

The agent-logs WebSocket proxy injected the agent token raw into the upstream
query string (?token=<token>). Tokens containing base64/url-special characters
(+, /, =) were then mangled by the query parser on the agent side (e.g. "+"
decoded to a space), so the agent rejected the stream with close code 4401 even
though the same token works for the HTTP API (where it travels in the
Authorization header). URL-encode the token with urllib.parse.quote so it
round-trips intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-08 11:21:28 +00:00
co-authored by Claude Opus 4.8
parent 5ebd615651
commit 4bc0fb8901
4 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ async def lifespan(app: FastAPI):
schedule_task.cancel()
app = FastAPI(title="StackPilot", version="0.13.1", lifespan=lifespan)
app = FastAPI(title="StackPilot", version="0.13.2", lifespan=lifespan)
app.add_middleware(
CORSMiddleware,