Class FixedCorsConfigurationSource

java.lang.Object
org.craftercms.commons.spring.cors.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 Details

    • config

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

    • FixedCorsConfigurationSource

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

    • getCorsConfiguration

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

      public static List<String> getOrigins(String value)