Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
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.