Skip to content

bug-report-py 3.1.0: forward(), the proxy core for apps that are not Flask - #31

Merged
kenatleap merged 2 commits into
mainfrom
feat/proxy-core
Nov 15, 2026
Merged

kenatleap merged 2 commits into
mainfrom
feat/proxy-core

Conversation

@kenatleap

Copy link
Copy Markdown
Collaborator

The daily report and the fleet dashboard run standard-library HTTP servers, so they can't mount the Flask `create_proxy_blueprint`.

What changes

  • *`bug_report.proxy.forward(method, rest, query, body, browser_headers, , central_url, app, token_provider, person_provider)` returns `(status, body, headers)`. It carries every rule the blueprint had: `..`/`.`/`\` refused; lists default to the app; browser headers filtered; bearer token and `X-Leap-*` added; a marked trust refusal → 502; a short body → 502; `http.client` with no `Connection: close`; generic 502 bodies.
  • The blueprint is now a thin wrapper over it. Every existing proxy test passes unchanged.
  • `rest` may be raw or decoded. `forward()` decodes once before refusing, so `%2e%2e` and `%5c` are refused with nothing sent, then re-quotes each outgoing segment. (Found by review: a stdlib caller passes the raw path.)

Tests (rerun by the coordinator, fresh venv): Python 367 + CLI 7, e2e 96, Node 188/17/63, none failing.

  • `test_proxy_forward.py` covers each rule directly against a real central over HTTP.
  • New tests cover the encoded-path refusal and the round trip of `a%20b/c`.
  • Each was shown to fail with its code broken (T4).

Review (T1): a fresh reviewer found no rule lost in the refactor. It caught the encoded-path bypass in a stdlib caller (fixed here) and doc drift (fixed).

Tag `backends-v3.1.0` after merge; the daily report pins it.

🤖 Generated with Claude Code

kmoy007 and others added 2 commits November 14, 2026 21:11
…a plain function for apps that are not Flask; the blueprint wraps it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(%2e%2e, %5c), re-quotes outgoing segments; docs say which forms rest takes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kenatleap
kenatleap enabled auto-merge (squash) November 15, 2026 05:39
@kenatleap
kenatleap merged commit fdec2fa into main Nov 15, 2026
1 check passed
@kenatleap
kenatleap deleted the feat/proxy-core branch November 15, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants