code: @Override
      public HttpResponse transformResponse(HttpRequest request, HttpResponse response) {
  
          if (response instanceof FullHttpResponse) {
  
              FullHttpResponse fullResponse = (FullHttpResponse) response;
  
              String contentTypeHeader = fullResponse.headers().get("Content-Type");
  
              if (contentTypeHeader != null && contentTypeHeader.startsWith("text/")) {
  
                  ContentType contentType = ContentType.parse(contentTypeHeader);
                  Charset charset = contentType.getCharset();
  
                  ByteBuf content = fullResponse.content();
  
                  byte[] data = new byte[content.readableBytes()];
                  content.readBytes(data);
  
                  String responseToTransform = createStringFromData(data, charset);
                  RealURLToProxyURLMapping mapping = realToProxyURLMappingInst.get();
  
                  for (Map.Entry<URL, URL> entry : mapping.asMap().entrySet()) {
                      String realUrl = entry.getKey().toExternalForm();
                      String proxyUrl = entry.getValue().toExternalForm();
  
                      int urlStart = responseToTransform.indexOf(realUrl);
  
                      if (urlStart > 0) {
                          responseToTransform = responseToTransform.replace(realUrl, proxyUrl);
                      }
                  }
  
                  byte[] bytes = createDataFromString(responseToTransform, charset);
                  ByteBuf transformedContent = Unpooled.buffer(bytes.length);
                  transformedContent.writeBytes(bytes);
  
                  DefaultFullHttpResponse transformedResponse =
                      new DefaultFullHttpResponse(fullResponse.getProtocolVersion(),
                          fullResponse.getStatus(), transformedContent);
                  transformedResponse.headers().set(fullResponse.headers());
                  HttpHeaders.setContentLength(transformedResponse, bytes.length);
  
                  return transformedResponse;
              }
          }
  
          return response;
      }
docs: TODO fix