public HttpHeaders generatePreflightResponseHeaders ( ) { final HttpHeaders headers = new DefaultHttpHeaders ( ) ; preflightResponseHeaders . forEach ( ( key , value ) -> { final Object val = getValue ( value ) ; if ( val instanceof Iterable ) { headers . addObject ( key , ( Iterable < ? > ) val ) ; } else { headers . addObject ( key , val ) ; } } ) ; return headers . asImmutable ( ) ; }
Generates immutable HTTP response headers that should be added to a CORS preflight response .