Package ch.psi.wica.config
Class WicaCorsConfigurer
java.lang.Object
ch.psi.wica.config.WicaCorsConfigurer
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
class WicaCorsConfigurer
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Provides the functionality to configure CORS.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCorsMappings
(org.springframework.web.servlet.config.annotation.CorsRegistry registry) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Constructor Details
-
WicaCorsConfigurer
public WicaCorsConfigurer(@Value("${wica.cors-allowed-origin-patterns}") String allowedOriginPatterns) Constructs a new instance.- Parameters:
allowedOriginPatterns
- the allowed origin patterns.
-
-
Method Details
-
addCorsMappings
public void addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry) - Specified by:
addCorsMappings
in interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-