Skip to content

Follow redirects based on the request and strip credentials on cross-…#4226

Open
WelschChristopher wants to merge 1 commit into
flowable:mainfrom
WelschChristopher:follow-redirect-strip-sensitive-headers
Open

Follow redirects based on the request and strip credentials on cross-…#4226
WelschChristopher wants to merge 1 commit into
flowable:mainfrom
WelschChristopher:follow-redirect-strip-sensitive-headers

Conversation

@WelschChristopher

Copy link
Copy Markdown
Contributor

…host redirects

The Spring WebClient based FlowableHttpClient never followed redirects. It now follows them unless the request disables redirects (HttpRequest#isNoRedirects), consistent with the Apache HttpClient based clients. This is implemented with two WebClients (one following redirects, one not) selected per request.

The Apache HttpClient 5 based client refused to follow a redirect to a different host when the request carried credentials or cookies. It now strips those sensitive headers (Authorization, Cookie, Proxy-Authorization) on cross-host redirects and follows the redirect, so content behind a redirect can be retrieved without leaking credentials to the redirect target.

Reactor Netty already drops sensitive headers on cross-domain redirects.

Check List:

  • Unit tests: YES / NO / NA
  • Documentation: YES / NO / NA

@WelschChristopher
WelschChristopher force-pushed the follow-redirect-strip-sensitive-headers branch from 6745b6d to e931eda Compare July 23, 2026 09:39
…host redirects

The Spring WebClient based FlowableHttpClient never followed redirects. It now
follows them unless the request disables redirects (HttpRequest#isNoRedirects).
The decision is made per request: a Reactor context value is written on the
exchange and read by a Reactor Netty followRedirect predicate, so a single
client/connection pool is used.

The Apache HttpClient 5 based client refused to follow a redirect to a different
host when the request carried credentials or cookies. It now strips those
sensitive headers (Authorization, Cookie, Proxy-Authorization) on cross-host
redirects and follows the redirect, so content behind a redirect can be
retrieved without leaking credentials to the redirect target.

Reactor Netty already drops sensitive headers on cross-domain redirects.
@WelschChristopher
WelschChristopher force-pushed the follow-redirect-strip-sensitive-headers branch from e931eda to 08432c3 Compare July 24, 2026 08:38
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.

1 participant