Class LocationHeaderFilter

  • All Implemented Interfaces:
    org.forgerock.http.Filter

    public class LocationHeaderFilter
    extends Object
    implements org.forgerock.http.Filter
    Rewrites Location headers on responses that generate a redirect that would take the user directly to the application being proxied rather than taking the user through OpenIG. Options:
     
     {
       "baseURI"                     : expression        [OPTIONAL - default to the original URI
                                                                     of the request ]
     }
     
     
    Example:
     
     {
          "name": "LocationRewriter",
          "type": "LocationHeaderFilter",
          "config": {
              "baseURI": "https://proxy.example.com:443/"
           }
     }
     
     
    • Constructor Detail

      • LocationHeaderFilter

        public LocationHeaderFilter()
    • Method Detail

      • setBaseURI

        public void setBaseURI​(Expression<String> baseURI)
        Sets the base URI used to rewrite Location headers.
        Parameters:
        baseURI - expression that, when evaluated, will represents the base URI of this OpenIG instance
      • filter

        public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,​org.forgerock.util.promise.NeverThrowsException> filter​(org.forgerock.services.context.Context context,
                                                                                                                                                     org.forgerock.http.protocol.Request request,
                                                                                                                                                     org.forgerock.http.Handler next)
        Specified by:
        filter in interface org.forgerock.http.Filter