Class UrlBasedCorsConfigurationSource

java.lang.Object
org.springframework.web.cors.UrlBasedCorsConfigurationSource
All Implemented Interfaces:
CorsConfigurationSource

public class UrlBasedCorsConfigurationSource extends Object implements CorsConfigurationSource
CorsConfigurationSource that uses URL path patterns to select the CorsConfiguration for a request.

Pattern matching can be done with a PathMatcher or with pre-parsed PathPatterns. The syntax is largely the same with the latter being more tailored for web usage and more efficient. The choice depends on the presence of a resolved String lookupPath or a parsed RequestPath with a fallback on PathMatcher but the fallback can be disabled. For more details, please see setAllowInitLookupPath(boolean).

Since:
4.2
Author:
Sebastien Deleuze, Rossen Stoyanchev
See Also: