JCorsConfig buildConfig ( ) { JCorsConfig config = new JCorsConfig ( ) ; if ( enableNonCorsRequests != null ) { config . setEnableNonCorsRequests ( enableNonCorsRequests ) ; } if ( resourcesSupportCredentials != null ) { config . setResourcesSupportCredentials ( resourcesSupportCredentials ) ; } if ( preflightResultCacheMaxAge != null ) { config . setPreflightResultCacheMaxAge ( preflightResultCacheMaxAge ) ; } setAllowedOrigins ( config ) ; setAllowedHeaders ( config ) ; setAllowedMethods ( config ) ; setExposedHeaders ( config ) ; return config ; }
Build a new configuration