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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFixedCorsConfigurationSource(boolean disableCORS, String allowOrigins, String allowMethods, String maxAge, String allowHeaders, boolean allowCredentials) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.cors.CorsConfigurationgetCorsConfiguration(jakarta.servlet.http.HttpServletRequest request) getOrigins(String value)
-
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(jakarta.servlet.http.HttpServletRequest request) - Specified by:
getCorsConfigurationin interfaceorg.springframework.web.cors.CorsConfigurationSource
-
getOrigins
-