Class ContextPathRedirectPatternRule

java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.PatternRule
org.eclipse.jetty.rewrite.handler.RedirectPatternRule
org.apache.nifi.web.server.handler.ContextPathRedirectPatternRule

public class ContextPathRedirectPatternRule extends org.eclipse.jetty.rewrite.handler.RedirectPatternRule
Context Path extension of Redirect Pattern Rule supporting context paths provided in request headers
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jetty.rewrite.handler.Rule

    org.eclipse.jetty.rewrite.handler.Rule.Handler, org.eclipse.jetty.rewrite.handler.Rule.HttpURIHandler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<String>
     
    private static final String
     
    private static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContextPathRedirectPatternRule(String pattern, String location, List<String> allowedContextPaths)
    Context Path Redirect Pattern Rule with supported context paths
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.jetty.rewrite.handler.Rule.Handler
    apply(org.eclipse.jetty.rewrite.handler.Rule.Handler input)
     
    private String
    getContextPath(org.eclipse.jetty.http.HttpFields requestHeaders)
     
    private String
    getFirstHeader(org.eclipse.jetty.http.HttpFields requestFields, ProxyHeader... proxyHeaders)
     
    private String
    getRedirectUri(org.eclipse.jetty.rewrite.handler.Rule.Handler inputHandler)
     

    Methods inherited from class org.eclipse.jetty.rewrite.handler.RedirectPatternRule

    getLocation, getStatusCode, isTerminating, setLocation, setStatusCode, toString

    Methods inherited from class org.eclipse.jetty.rewrite.handler.PatternRule

    getPattern, matchAndApply, setPattern

    Methods inherited from class org.eclipse.jetty.rewrite.handler.Rule

    setTerminating

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ContextPathRedirectPatternRule

      public ContextPathRedirectPatternRule(String pattern, String location, List<String> allowedContextPaths)
      Context Path Redirect Pattern Rule with supported context paths
      Parameters:
      pattern - Path pattern to be matched
      location - Location for redirect URI
      allowedContextPaths - Context Path values allowed in request headers
  • Method Details

    • apply

      public org.eclipse.jetty.rewrite.handler.Rule.Handler apply(org.eclipse.jetty.rewrite.handler.Rule.Handler input) throws IOException
      Overrides:
      apply in class org.eclipse.jetty.rewrite.handler.RedirectPatternRule
      Throws:
      IOException
    • getRedirectUri

      private String getRedirectUri(org.eclipse.jetty.rewrite.handler.Rule.Handler inputHandler)
    • getContextPath

      private String getContextPath(org.eclipse.jetty.http.HttpFields requestHeaders)
    • getFirstHeader

      private String getFirstHeader(org.eclipse.jetty.http.HttpFields requestFields, ProxyHeader... proxyHeaders)