类的使用
cn.taketoday.web.config.CorsRegistration
使用CorsRegistration的程序包
-
cn.taketoday.web.config中CorsRegistration的使用
类型参数类型为CorsRegistration的cn.taketoday.web.config中的字段修饰符和类型方法说明CorsRegistry.addMapping(String pathPattern) Enable cross-origin request handling for the specified path pattern.CorsRegistration.allowCredentials(boolean allowCredentials) Whether the browser should send credentials, such as cookies along with cross domain requests, to the annotated endpoint.CorsRegistration.allowedHeaders(String... headers) Set the list of headers that a pre-flight request can list as allowed for use during an actual request.CorsRegistration.allowedMethods(String... methods) Set the HTTP methods to allow, e.g.CorsRegistration.allowedOriginPatterns(String... patterns) Alternative toallowedOrigins(String...)that supports more flexible patterns for specifying the origins for which cross-origin requests are allowed from a browser.CorsRegistration.allowedOrigins(String... origins) Set the origins for which cross-origin requests are allowed from a browser.CorsRegistration.combine(CorsConfiguration other) Apply the givenCorsConfigurationto the one being configured viaCorsConfiguration.combine(CorsConfiguration)which in turn has been initialized withCorsConfiguration.applyPermitDefaultValues().CorsRegistration.exposedHeaders(String... headers) Set the list of response headers that an actual response might have and can be exposed.CorsRegistration.maxAge(long maxAge) Configure how long in seconds the response from a pre-flight request can be cached by clients.