public class RemoveSensitiveHeadersInterceptor
extends java.lang.Object
implements org.apache.hc.core5.http.HttpRequestInterceptor
A HTTP request interceptor that removes sensitive headers from the request after the client has been redirected to another host.
This interceptor should be put at the end of the request interceptor list so it has access to all headers that other interceptors have set.
See https://github.com/michel-kraemer/gradle-download-task/issues/382 for more information. Also see https://github.com/ducaale/xh/blob/df2040e34dccaf93b7978d6e8b3404a77e984432/src/redirect.rs#L95-L101 for a reference how other HTTP clients do this.
| Constructor and Description |
|---|
RemoveSensitiveHeadersInterceptor(org.apache.hc.core5.http.HttpHost originalHost)
Constructs a new interceptor
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.EntityDetails entity,
org.apache.hc.core5.http.protocol.HttpContext context) |