类的使用
cn.taketoday.web.servlet.filter.OncePerRequestFilter
使用OncePerRequestFilter的程序包
-
cn.taketoday.web.servlet.filter中OncePerRequestFilter的使用
修饰符和类型类说明classOncePerRequestFilterto add an X-Application-Context header that contains theApplicationContext ID.classServlet Filter that allows one to specify a character encoding for requests.classFilterthat 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 providedCorsConfigurationSourceclassFilterthat parses form data for HTTP PUT, PATCH, and DELETE requests and exposes it as Servlet request parameters.classExtract 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).classFilterthat converts posted method parameters into HTTP methods, retrievable viaHttpServletRequest.getMethod().classFormContentFilterthat also implementsOrdered.classHiddenHttpMethodFilterthat also implementsOrdered.classOverridesHttpServletResponse.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.classFilterthat generates anETagvalue based on the content on the response.