Uploaded image for project: '[Read Only] - Hippo Plugins'
  1. [Read Only] - Hippo Plugins
  2. HIPPLUG-1606

Provide end projects a way to customize http client when using urlrewriter proxying

    XMLWordPrintable

Details

    Description

      In a client project we had to customize the apache http client which is used in the RequestProxy class within Urlrewriter plugin. The customization was:

      • Follow redirects
      • useSystemProperties (method in request config builder)

      It would be really good if the end project implementations could have a way to provide their own http client implementations so they can meet their specific requirements. Another option of course is to specify somewhere in the rules the option to enable these properties. 

      The use case is as follows: when urlrewriter proxies the /site/_cmsinternal request to the SPA, SPA returns a 302 redirect to an authentication server. The underlying httpclient of urlrewriter has to follow this redirect, and the redirect after actually logging in. This required us to follow redirects in the http client. Another issue we faced was that in the enterprise network that we were working in, we had to go through a proxy to reach some of the redirected urls. We achieved this by setting jvm level system properties and having httpclient lib use those system properties by calling useSystemproperties() on the request config builder. I also attach the updated RequestProxy.java file for reference. 

      Attachments

        Activity

          People

            bvural Baris Can Vural
            bvural Baris Can Vural
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: