Skip to content
Discussion options

You must be logged in to vote

I think the most immediate way forward for you would be to implement your own ProxyHandlerFactory that instantiates an HttpProxyHandler with a specific set of headers. The existing HttpProxyHandlerFactory has a lot of machinery you probably don't need; ultimately, I think you'd want something really simple that just does:

public class FancyHttpProxyHandlerFactory {

  private final SocketAddress proxyAddress;
  private final HttpHeaders httpHeaders;

  public FancyHttpProxyHandlerFactory(final SocketAddress proxyAddress, final HttpHeaders httpHeaders) {
    this.proxyAddress = proxyAddress;
    this.httpHeaders = httpHeaders;
  }

  @Override
  public ProxyHandler createProxyHandler() {
    

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@thukschan
Comment options

@jchambers
Comment options

Answer selected by thukschan
@thukschan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants