Skip to content

[Automated] Draft docs (agentgateway): proxy: better direct response handling - #1505

Merged
artberger merged 3 commits into
mainfrom
pr-tracker-draft-agentgateway-4250
Nov 17, 2026
Merged

artberger merged 3 commits into
mainfrom
pr-tracker-draft-agentgateway-4250

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

agentgateway/agentgateway#4250 — proxy: better direct response handling

Docs versions: standalone/main, kubernetes/main

No code-path rule covers 9 touched file(s). The planner could route these only by identifier search, so the candidate pages may miss what they changed, including in the other mode:

  • Cargo.toml
  • crates/agentgateway/src/http/mod.rs
  • crates/agentgateway/src/proxy/gateway.rs
  • crates/agentgateway/src/proxy/httpproxy.rs
  • crates/agentgateway/src/proxy/mod.rs
  • crates/http/src/lib.rs
  • ...and 3 more

What changes for users: Direct responses now keep the reason from the component that produced them. MCP backend external authorization denials return the authorization service's status and body instead of 500; ExtProc response-phase ImmediateResponse replies are returned to clients; buffer-limit and CSRF rejections include client-safe response bodies.

What the docs now say: The standalone CSRF page now shows the csrf validation failed response body. The standalone body buffering page now names the 413 and 502 statuses and the request body too large and upstream response too large response bodies for fail-closed buffer-limit rejections.

How agentgateway-4250 was drafted

Plan, and what changed it

  • Planned: Update the direct-response, CSRF, buffer, ExtProc, and observability pages that describe direct-response behavior.
  • Learned: The dossier and target pages show no user-set field changed, and most candidate pages do not state the old DirectResponse reason; the stale actionable prose was on the standalone CSRF and buffer pages.
  • Did: Updated those standalone pages, left broad component reason changes to the release note, and did not edit shared Kubernetes assets that also render older version trees.

Why a documentation change is necessary

The pull request changes observable responses, not configuration shape. The body says failed CSRF checks now return csrf validation failed, request buffer failures return request body too large, and response buffer failures return upstream response too large. The standalone CSRF and body buffering pages documented the old response text or did not name these client-visible bodies, so readers could not predict the new results.

How to verify this change

  1. Start a standalone agentgateway from the main build with a route-level csrf policy and send a cross-site state-changing request.
  2. The client receives HTTP 403 with the response body csrf validation failed, and the request log records an authorization reason with the CSRF error.
  3. Configure policies.buffer.request.maxBytes and policies.buffer.response.maxBytes with failureMode: failClosed, then send request and response bodies larger than those limits. The request-body case returns HTTP 413 with request body too large; the response-body case returns HTTP 502 with upstream response too large if response headers were not already sent.

Files in this pull request

  • content/docs/standalone/main/documentation/configuration/security/csrf.md
  • content/docs/standalone/main/documentation/configuration/traffic-management/buffer.md
How the pages were chosen (triage report)

Draft a documentation change

agentgateway/agentgateway#4250 — proxy: better direct response handling

  • Product: agentgateway (upstream) → agentgateway/website
  • Docs version: standalone/main, kubernetes/main
  • Summary (read from the body): Previously, direct responses were handled via a ProxyResponse. We have a few issues with this:
  • Not tested: no cluster was available, so every command in this diff is unrun
  • No rule covers 9 touched file(s). The candidate pages below come from the files that DID match a rule, so they may scope this narrower than the change is. Read these before deciding the change is only about the pages listed:
    • Cargo.toml
    • crates/agentgateway/src/http/mod.rs
    • crates/agentgateway/src/proxy/gateway.rs
    • crates/agentgateway/src/proxy/httpproxy.rs
    • crates/agentgateway/src/proxy/mod.rs
    • crates/http/src/lib.rs
    • ...and 3 more

Release notes. This change's release note is not in this pull request. agentgateway/website keeps the PR tracker's notes in one pull request, from a pr-tracker-draft-rolling-notes-* branch, and this run adds it there.

Draft branch: pr-tracker-draft-agentgateway-4250

…handling

Drafts-Commit: a730fba
Signed-off-by: GitHub Action <action@github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Deploying agentproxy with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0dbea67
Status:⚡️  Build in progress...

View logs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Art Berger <art.berger@solo.io>
@artberger
artberger merged commit 0c6229d into main Nov 17, 2026
4 of 6 checks passed
@artberger
artberger deleted the pr-tracker-draft-agentgateway-4250 branch November 17, 2026 01:28
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