Package de.hybris.platform.core.cors.web
Class DefaultCorsConfigurationSource
- java.lang.Object
-
- de.hybris.platform.core.cors.web.DefaultCorsConfigurationSource
-
- All Implemented Interfaces:
org.springframework.web.cors.CorsConfigurationSource
public class DefaultCorsConfigurationSource extends java.lang.Object implements org.springframework.web.cors.CorsConfigurationSource
Configuration provider for the CorsFilter.
-
-
Constructor Summary
Constructors Constructor Description DefaultCorsConfigurationSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
extractContextName(javax.servlet.http.HttpServletRequest request)
org.springframework.web.cors.CorsConfiguration
getCorsConfiguration(javax.servlet.http.HttpServletRequest request)
protected org.springframework.web.cors.CorsConfiguration
getDefaultCorsConfiguration()
protected org.springframework.web.cors.CorsConfiguration
getDefaultOrCreateCorsConfiguration(java.lang.String contextName)
protected CorsPropertiesLoader
getPropertiesLoader()
protected java.util.Map<java.lang.String,java.lang.String>
loadPropertiesFromHybrisConfig(java.lang.String contextName)
protected java.util.Map<java.lang.String,java.lang.String>
mergeCorsConfigurations(java.util.Map<java.lang.String,java.lang.String> props, java.util.Set<CorsConfigurationPropertyModel> current)
protected java.util.Map<java.lang.String,java.lang.String>
readCorsConfiguration(java.lang.String contextName)
void
setConfigPropertiesToCorsConfigurationConverter(ConfigPropertiesToCorsConfigurationConverter configPropertiesToCorsConfigurationConverter)
void
setCorsConfigurationPropertyDao(DefaultGenericDao<CorsConfigurationPropertyModel> corsConfigurationDao)
void
setPropertiesLoader(CorsPropertiesLoader propertiesLoader)
-
-
-
Method Detail
-
getCorsConfiguration
public org.springframework.web.cors.CorsConfiguration getCorsConfiguration(javax.servlet.http.HttpServletRequest request)
- Specified by:
getCorsConfiguration
in interfaceorg.springframework.web.cors.CorsConfigurationSource
-
getDefaultOrCreateCorsConfiguration
protected org.springframework.web.cors.CorsConfiguration getDefaultOrCreateCorsConfiguration(java.lang.String contextName)
-
readCorsConfiguration
protected java.util.Map<java.lang.String,java.lang.String> readCorsConfiguration(java.lang.String contextName)
-
getDefaultCorsConfiguration
protected org.springframework.web.cors.CorsConfiguration getDefaultCorsConfiguration()
-
loadPropertiesFromHybrisConfig
protected java.util.Map<java.lang.String,java.lang.String> loadPropertiesFromHybrisConfig(java.lang.String contextName)
-
mergeCorsConfigurations
protected java.util.Map<java.lang.String,java.lang.String> mergeCorsConfigurations(java.util.Map<java.lang.String,java.lang.String> props, java.util.Set<CorsConfigurationPropertyModel> current)
-
extractContextName
protected java.lang.String extractContextName(javax.servlet.http.HttpServletRequest request)
-
setCorsConfigurationPropertyDao
public void setCorsConfigurationPropertyDao(DefaultGenericDao<CorsConfigurationPropertyModel> corsConfigurationDao)
-
setConfigPropertiesToCorsConfigurationConverter
public void setConfigPropertiesToCorsConfigurationConverter(ConfigPropertiesToCorsConfigurationConverter configPropertiesToCorsConfigurationConverter)
-
setPropertiesLoader
public void setPropertiesLoader(CorsPropertiesLoader propertiesLoader)
-
getPropertiesLoader
protected CorsPropertiesLoader getPropertiesLoader()
-
-