Class CorsRegistry

  • java.lang.Object
    • org.springframework.web.reactive.config.CorsRegistry

  • public class CorsRegistry
    extends java.lang.Object
    Assists with the registration of global, URL pattern based CorsConfiguration mappings.
    Sebastien Deleuze, Rossen Stoyanchev
    • Constructor Detail

      • CorsRegistry

        public CorsRegistry()
    • Method Detail

      • addMapping

        public CorsRegistration addMapping(java.lang.String pathPattern)
        Enable cross origin request handling for the specified path pattern.

        Exact path mapping URIs (such as "/admin") are supported as well as Ant-style path patterns (such as "/admin/**").

        The following defaults are applied to the CorsRegistration:

        • Allow all origins.
        • Allow "simple" methods GET, HEAD and POST.
        • Allow all headers.
        • Set max age to 1800 seconds (30 minutes).
      • getCorsConfigurations

        protected java.util.Map<java.lang.String,CorsConfiguration> getCorsConfigurations()