Skip to content

fix(http_proxy): preserve upstream redirects for SSO flows - #273

Merged
shenjinti merged 1 commit into
restsend:mainfrom
dengxiayehu:fix/auth
Sep 6, 2026
Merged

fix(http_proxy): preserve upstream redirects for SSO flows#273
shenjinti merged 1 commit into
restsend:mainfrom
dengxiayehu:fix/auth

Conversation

@dengxiayehu

Copy link
Copy Markdown
Contributor

Problem

The HTTP proxy client followed upstream redirects automatically. As a result, callers could not receive
the original 3xx response and Location header required to complete SSO handoff flows.

Regular HTTP redirects were followed by the proxy itself, while redirects using a custom URI scheme
could fail before reaching the client.

Fix

  • Add a keepalive HTTP client variant that disables automatic redirect handling while preserving the
    existing timeout, connection pool, and TCP keepalive behavior.
  • Use the no-redirect client in the HTTP proxy, including its fallback construction path.
  • Return upstream redirect responses and Location headers unchanged so the calling client can handle
    the SSO redirect.
  • Add regression coverage for both regular HTTP redirects and custom URI scheme redirects, including
    verification that the proxy does not request the redirect destination.

- preserve existing keepalive behavior for current callers
- record the CC proxy redirect passthrough fix
@shenjinti
shenjinti merged commit d28c938 into restsend:main Sep 6, 2026
2 checks passed
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