程序包 cn.taketoday.web.servlet.filter
package cn.taketoday.web.servlet.filter
-
类说明
OncePerRequestFilterto add an X-Application-Context header that contains theApplicationContext ID.Servlet Filter that allows one to specify a character encoding for requests.Filterthat handles CORS preflight requests and intercepts CORS simple and actual requests thanks to aCorsProcessorimplementation (DefaultCorsProcessorby default) in order to add the relevant CORS response headers (likeAccess-Control-Allow-Origin) using the providedCorsConfigurationSourceProxy for a standard Servlet Filter, delegating to a Frameworkmanaged bean that implements the Filter interface.Filterthat parses form data for HTTP PUT, PATCH, and DELETE requests and exposes it as Servlet request parameters.Extract values from "Forwarded" and "X-Forwarded-*" headers, wrap the request and response, and make they reflect the client-originated protocol and address in the following methods:getServerName()getServerPort()getScheme()isSecure()sendRedirect(String).Extract and use "Forwarded" or "X-Forwarded-*" headers.Hide "Forwarded" or "X-Forwarded-*" headers.Responsible for the contextPath, requestURI, and requestURL with forwarded headers in mind, and also taking into account changes to the path of the underlying delegate request (e.g. on a Servlet FORWARD).Simple base implementation ofFilterwhich treats its config parameters (init-paramentries within thefiltertag inweb.xml) as bean properties.Filterthat converts posted method parameters into HTTP methods, retrievable viaHttpServletRequest.getMethod().SimpleHttpServletRequestwrapper that returns the supplied method forHttpServletRequest.getMethod().Filter base class that aims to guarantee a single execution per request dispatch, on any servlet container.AnOrderedFilter.FormContentFilterthat also implementsOrdered.HiddenHttpMethodFilterthat also implementsOrdered.OverridesHttpServletResponse.sendRedirect(String)and handles it by setting the HTTP status and "Location" headers, which keeps the Servlet container from re-writing relative redirect URLs into absolute ones.A response wrapper used for the implementation ofRelativeRedirectFilteralso shared withForwardedHeaderFilter.Filterthat generates anETagvalue based on the content on the response.Returns the raw OutputStream, instead of the one that does caching, ifShallowEtagHeaderFilter.isContentCachingDisabled(jakarta.servlet.http.HttpServletRequest).