code: @Override
      public void updateHeaders(RequestContext context, Multimap<String, String> headers) {
          if (!proxyPassReverse) {
              return;
          }
          for (Map.Entry<String, String> h : new LinkedHashSet<>(headers.entries())) {
              if (REVERSE_PROXY_HEADERS.contains(h.getKey())) {
                  URI location = URI.create(h.getValue()).normalize();
                  if (location.isAbsolute() && isBackendLocation(location)) {
                      String initial = context.request().uri();
                      URI uri = URI.create(initial);
                      try {
                          URI newURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(),
                                  location.getPath(), location.getQuery(), location.getFragment());
                          headers.remove(h.getKey(), h.getValue());
                          headers.put(h.getKey(), newURI.toString());
                      } catch (URISyntaxException e) {
                          logger.error("Cannot manipulate the header {} (value={}) to enforce reverse routing", h
                                  .getKey(), h.getValue(), e);
                      }
                  }
              }
          }
      }
docs: Callback that can be overridden to customize the header ot the request. This method implements the reverse
  routing. It updates URLs contained in the headers.
  
  @param context the request context
  @param headers the current set of headers, that need to be modified