Class FixedCorsConfigurationSource

  • All Implemented Interfaces:
    org.springframework.web.cors.CorsConfigurationSource

    public class FixedCorsConfigurationSource
    extends Object
    implements org.springframework.web.cors.CorsConfigurationSource
    Implementation of CorsConfigurationSource that setup and returns a single instance
    Since:
    3.1.11
    Author:
    joseross
    • Field Detail

      • config

        protected org.springframework.web.cors.CorsConfiguration config
    • Constructor Detail

      • FixedCorsConfigurationSource

        @ConstructorProperties({"disableCORS","allowOrigins","allowMethods","maxAge","allowHeaders","allowCredentials"})
        public FixedCorsConfigurationSource​(boolean disableCORS,
                                            String allowOrigins,
                                            String allowMethods,
                                            String maxAge,
                                            String allowHeaders,
                                            boolean allowCredentials)
    • Method Detail

      • getCorsConfiguration

        public org.springframework.web.cors.CorsConfiguration getCorsConfiguration​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getCorsConfiguration in interface org.springframework.web.cors.CorsConfigurationSource