类的使用
cn.taketoday.web.cors.CorsConfiguration
使用CorsConfiguration的程序包
程序包
说明
Support for CORS (Cross-Origin Resource Sharing),
based on a common
CorsProcessor strategy.Web Handler
Method handler
Support classes for serving static resources.
-
cn.taketoday.web.config中CorsConfiguration的使用
类型参数类型为CorsConfiguration的cn.taketoday.web.config中的字段返回变量类型为CorsConfiguration的类型的cn.taketoday.web.config中的方法修饰符和类型方法说明protected Map<String,CorsConfiguration> CorsRegistry.getCorsConfigurations()Return the registeredCorsConfigurationobjects, keyed by path pattern.protected final Map<String,CorsConfiguration> WebMvcConfigurationSupport.getCorsConfigurations()Return the registeredCorsConfigurationobjects, keyed by path pattern.参数类型为CorsConfiguration的cn.taketoday.web.config中的方法修饰符和类型方法说明CorsRegistration.combine(CorsConfiguration other) Apply the givenCorsConfigurationto the one being configured viacombine(CorsConfiguration)which in turn has been initialized withapplyPermitDefaultValues(). -
cn.taketoday.web.cors中CorsConfiguration的使用
类型参数类型为CorsConfiguration的cn.taketoday.web.cors中的字段修饰符和类型字段说明private final Map<PathPattern,CorsConfiguration> UrlBasedCorsConfigurationSource.corsConfigurations修饰符和类型方法说明CorsConfiguration.applyPermitDefaultValues()By default a newly createdCorsConfigurationdoes not permit any cross-origin requests and must be configured explicitly to indicate what should be allowed.CorsConfiguration.combine(CorsConfiguration other) Combine the non-null properties of the suppliedCorsConfigurationwith this one.CorsConfigurationCapable.getCorsConfiguration()CorsConfigurationSource.getCorsConfiguration(RequestContext request) Return aCorsConfigurationbased on the incoming request.UrlBasedCorsConfigurationSource.getCorsConfiguration(RequestContext request) CorsConfiguration.setAllowedOriginPatterns(List<String> allowedOriginPatterns) Alternative tosetAllowedOrigins(java.util.List<java.lang.String>)that supports more flexible origins patterns with "*" anywhere in the host name in addition to port lists.返回变量类型为CorsConfiguration的类型的cn.taketoday.web.cors中的方法参数类型为CorsConfiguration的cn.taketoday.web.cors中的方法修饰符和类型方法说明DefaultCorsProcessor.checkHeaders(CorsConfiguration config, List<String> requestHeaders) Check the headers and determine the headers for the response of a pre-flight request.protected List<HttpMethod>DefaultCorsProcessor.checkMethods(CorsConfiguration config, HttpMethod method) Check the HTTP method and determine the methods for the response of a pre-flight request.protected StringDefaultCorsProcessor.checkOrigin(CorsConfiguration config, String requestOrigin) Check the origin and determine the origin for the response.CorsConfiguration.combine(CorsConfiguration other) Combine the non-null properties of the suppliedCorsConfigurationwith this one.protected booleanDefaultCorsProcessor.handleInternal(RequestContext context, CorsConfiguration config, boolean preFlightRequest) Handle the given request.booleanCorsProcessor.process(CorsConfiguration configuration, RequestContext context) Process a request given aCorsConfiguration.booleanDefaultCorsProcessor.process(CorsConfiguration config, RequestContext context) voidUrlBasedCorsConfigurationSource.registerCorsConfiguration(String pattern, CorsConfiguration config) Variant ofUrlBasedCorsConfigurationSource.setCorsConfigurations(Map)to register one mapping at a time.类型变量类型为CorsConfiguration的cn.taketoday.web.cors中的方法参数修饰符和类型方法说明voidUrlBasedCorsConfigurationSource.setCorsConfigurations(Map<String, CorsConfiguration> corsConfigurations) Set the CORS configuration mappings.参数类型为CorsConfiguration的cn.taketoday.web.cors中的构造器限定符构造器说明Construct a newCorsConfigurationinstance by copying all values from the suppliedCorsConfiguration. -
cn.taketoday.web.handler中CorsConfiguration的使用
修饰符和类型字段说明private final CorsConfigurationAbstractHandlerMapping.CorsInterceptor.configprivate final CorsConfigurationAbstractHandlerMapping.PreFlightHandler.config修饰符和类型方法说明AbstractHandlerMapping.CorsInterceptor.getCorsConfiguration(RequestContext request) protected CorsConfigurationAbstractHandlerMapping.getCorsConfiguration(Object handler, RequestContext request) Retrieve the CORS configuration for the given handler.AbstractHandlerMapping.PreFlightHandler.getCorsConfiguration(RequestContext request) protected CorsConfigurationCorsHandlerInterceptor.getCorsConfiguration(RequestContext context, Object handler) 修饰符和类型方法说明protected HandlerExecutionChainAbstractHandlerMapping.getCorsHandlerExecutionChain(RequestContext request, HandlerExecutionChain chain, CorsConfiguration config) Update the HandlerExecutionChain for CORS-related handling.voidCorsHandlerInterceptor.setConfigSource(CorsConfiguration configSource) Configure a customCorsConfiguration类型变量类型为CorsConfiguration的cn.taketoday.web.handler中的方法参数修饰符和类型方法说明voidAbstractHandlerMapping.setCorsConfigurations(Map<String, CorsConfiguration> corsConfigurations) Set "global" CORS configuration mappings.参数类型为CorsConfiguration的cn.taketoday.web.handler中的构造器限定符构造器说明CorsHandlerInterceptor(CorsConfiguration configSource) CorsInterceptor(CorsConfiguration config) PreFlightHandler(CorsConfiguration config) -
cn.taketoday.web.handler.method中CorsConfiguration的使用
类型参数类型为CorsConfiguration的cn.taketoday.web.handler.method中的字段修饰符和类型字段说明private final ConcurrentHashMap<HandlerMethod,CorsConfiguration> AbstractHandlerMethodMapping.MappingRegistry.corsLookup修饰符和类型方法说明protected CorsConfigurationAbstractHandlerMethodMapping.getCorsConfiguration(Object handler, RequestContext request) AbstractHandlerMethodMapping.MappingRegistry.getCorsConfiguration(HandlerMethod handlerMethod) Return CORS configuration.protected CorsConfigurationAbstractHandlerMethodMapping.initCorsConfiguration(Object handler, HandlerMethod handlerMethod, Method method, T mapping) Extract and return the CORS configuration for the mapping.protected CorsConfigurationRequestMappingHandlerMapping.initCorsConfiguration(Object handler, HandlerMethod handlerMethod, Method method, RequestMappingInfo mappingInfo) 修饰符和类型方法说明private voidRequestMappingHandlerMapping.updateCorsConfig(CorsConfiguration config, CrossOrigin annotation) -
cn.taketoday.web.resource中CorsConfiguration的使用
修饰符和类型方法说明ResourceHttpRequestHandler.getCorsConfiguration(RequestContext request) Return the specified CORS configuration.修饰符和类型方法说明voidResourceHttpRequestHandler.setCorsConfiguration(CorsConfiguration corsConfiguration) Specify the CORS configuration for resources served by this handler.