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

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

Introduction

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

Prototype

@Nullable
public List<HttpMethod> checkHttpMethod(@Nullable HttpMethod requestMethod) 

Source Link

Document

Check the HTTP request method (or the method from the Access-Control-Request-Method header on a pre-flight request) against the configured allowed methods.

Usage

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

/**
 * Check the HTTP method and determine the methods 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 va  2s. com*/
@Nullable
protected List<HttpMethod> checkMethods(CorsConfiguration config, @Nullable HttpMethod requestMethod) {
    return config.checkHttpMethod(requestMethod);
}