Package org.dspace.app.rest.utils
Class ApplicationConfig
- java.lang.Object
-
- org.dspace.app.rest.utils.ApplicationConfig
-
@Configuration @ComponentScan({"org.dspace.app.rest.converter","org.dspace.app.rest.repository","org.dspace.app.rest.utils","org.dspace.app.configuration"}) public class ApplicationConfig extends ObjectThis class provides extra configuration for our Spring Boot ApplicationNOTE: @ComponentScan on "org.dspace.app.configuration" provides a way for other DSpace modules or plugins to "inject" their own Spring configurations / subpaths into our Spring Boot webapp.
- Author:
- Andrea Bollini (andrea.bollini at 4science.it), Tim Donohue
-
-
Constructor Summary
Constructors Constructor Description ApplicationConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCorsAllowCredentials()Return whether to allow credentials (cookies) on CORS requests.String[]getCorsAllowedOrigins()Return the array of allowed origins (client URLs) for the CORS "Access-Control-Allow-Origin" header Used by Application class
-
-
-
Method Detail
-
getCorsAllowedOrigins
public String[] getCorsAllowedOrigins()
Return the array of allowed origins (client URLs) for the CORS "Access-Control-Allow-Origin" header Used by Application class- Returns:
- Array of URLs
-
getCorsAllowCredentials
public boolean getCorsAllowCredentials()
Return whether to allow credentials (cookies) on CORS requests. This is used to set the CORS "Access-Control-Allow-Credentials" header in Application class.- Returns:
- true or false
-
-