Package org.apache.synapse.api.cors
Class SynapseCORSConfiguration
- java.lang.Object
-
- org.apache.synapse.api.cors.SynapseCORSConfiguration
-
- All Implemented Interfaces:
CORSConfiguration
public class SynapseCORSConfiguration extends Object implements CORSConfiguration
This class holds CORS configurations made in synapse.properties file
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllowedHeaders()
Returns allowed headers in the configuration.Set<String>
getAllowedOrigins()
Returns allowed origins in the configuration.static SynapseCORSConfiguration
getInstance()
boolean
isEnabled()
Returns if CORS is enabled.
-
-
-
Method Detail
-
getInstance
public static SynapseCORSConfiguration getInstance()
-
isEnabled
public boolean isEnabled()
Description copied from interface:CORSConfiguration
Returns if CORS is enabled.- Specified by:
isEnabled
in interfaceCORSConfiguration
- Returns:
- boolean enabled
-
getAllowedOrigins
public Set<String> getAllowedOrigins()
Description copied from interface:CORSConfiguration
Returns allowed origins in the configuration.- Specified by:
getAllowedOrigins
in interfaceCORSConfiguration
- Returns:
- allowed origins
-
getAllowedHeaders
public String getAllowedHeaders()
Description copied from interface:CORSConfiguration
Returns allowed headers in the configuration.- Specified by:
getAllowedHeaders
in interfaceCORSConfiguration
- Returns:
- allowed headers
-
-