java.lang.Object
com.amazonaws.serverless.proxy.internal.servlet.filters.UrlPathValidator
All Implemented Interfaces:
jakarta.servlet.Filter

@WebFilter(filterName="UrlPathValidator", urlPatterns="/*") public class UrlPathValidator extends Object implements jakarta.servlet.Filter
Simple path validator filter. This is a default implementation to prevent malformed paths from hitting the framework app. This applies to all paths by default
  • Field Details

  • Constructor Details

    • UrlPathValidator

      public UrlPathValidator()
  • Method Details

    • init

      public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Filter
      Throws:
      jakarta.servlet.ServletException
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.servlet.Filter
    • getInvalidStatusCode

      public int getInvalidStatusCode()
      Returns the status code used in the errors generated by this filter.
      Returns:
      The default status code the filter will use