You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add config option to allow preserveAuthorizationOnRedirect? #2178
Would it be possible to add a config override to disable the strip-auth feature host check? (i.e. something like preserveAuthorizationOnRedirect?)
Our setup rewrites the httprequest host and port using a bunch of custom routing logic which involves many aspects of the original request (host, path, control headers), and we have some internal endpoints which return 307 redirects to the un-rewritten service domain host (i.e. internal.services.myco). This code relies on the old behavior of 2.12.3, which propagated the authorization header when following the redirect.
Alternatively, if I could configure some mechanism to allow auth propagation on redirects (i.e. Function<org.asynchttpclient.uri.Uri, Boolean>) I could pass in ((uri) -> uri.getHost().endswith(".services.myco"))
I understand this change was put in place to remediate a cve, but in our case these particular httpclients are specially configured as "internal-only".
In the meantime I'm exploring a workaround with a ResponseFilter; will post update with my findings.
Probably a config to disable all safety mechanisms would be nice but it also open doors to potential misconfiguration. I would rather prefer to document this workaround if someone really wants to do it.
Activity
jaredstehler commentedon May 13, 2026
i was able to get my desired behavior with a custom response filter and
this feature request is perhaps too niche to include in the library, since there's a viable workaround.
hyperxpro commentedon May 23, 2026
Probably a config to disable all safety mechanisms would be nice but it also open doors to potential misconfiguration. I would rather prefer to document this workaround if someone really wants to do it.