Class CorsConfig

java.lang.Object
de.samply.reporter.app.CorsConfig
All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration public class CorsConfig extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
  • Constructor Summary

    Constructors
    Constructor
    Description
    CorsConfig(String[] crossOrigins, Integer corsMaxAgeInSeconds)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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

    • CorsConfig

      public CorsConfig(@Value("#{\'${CROSS_ORIGINS:#{null}}\'.split(\',\')}") String[] crossOrigins, @Value("${CORS_MAX_AGE_IN_SECONDS:360}") Integer corsMaxAgeInSeconds)
  • Method Details

    • addCorsMappings

      public void addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry)
      Specified by:
      addCorsMappings in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer