Example usage for org.springframework.web.cors CorsConfiguration checkHeaders

List of usage examples for org.springframework.web.cors CorsConfiguration checkHeaders

Introduction

In this page you can find the example usage for org.springframework.web.cors CorsConfiguration checkHeaders.

Prototype

@Nullable
public List<String> checkHeaders(@Nullable List<String> requestHeaders) 

Source Link

Document

Check the supplied request headers (or the headers listed in the Access-Control-Request-Headers of a pre-flight request) against the configured allowed headers.

Usage

From source file:org.springframework.web.cors.DefaultCorsProcessor.java

/**
 * Check the headers and determine the headers for the response of a
 * pre-flight request. The default implementation simply delegates to
 * {@link org.springframework.web.cors.CorsConfiguration#checkOrigin(String)}.
 *///from w  w  w  .  j a  v a  2  s . c o m
@Nullable
protected List<String> checkHeaders(CorsConfiguration config, List<String> requestHeaders) {
    return config.checkHeaders(requestHeaders);
}

From source file:org.springframework.web.cors.reactive.DefaultCorsProcessor.java

/**
 * Check the headers and determine the headers for the response of a
 * pre-flight request. The default implementation simply delegates to
 * {@link CorsConfiguration#checkOrigin(String)}.
 *//* www .  j a  v  a  2 s  . co m*/
@Nullable

protected List<String> checkHeaders(CorsConfiguration config, List<String> requestHeaders) {
    return config.checkHeaders(requestHeaders);
}